Expand description
Result aliases and composable result extensions.
The module covers filtering, inspection, logging, flattening, and expectation helpers. Most adapters preserve the original result type.
ModulesΒ§
- and_
then_ πref - debug_
inspect π - expect_
unchecked π - filter π
- flat_ok π
- inspect_
log π - into_
is_ πok - is_
err_ πor - log_
debug_ πerr - log_err π
- map_
expect π - map_ref π
- not_
found π - unwrap_
infallible π - unwrap_
or_ πerr
TraitsΒ§
- AndThen
Ref - Chains a fallible operation over a shared reference to a success value.
- Debug
Inspect - Inspect Result values with release-mode elision.
- ErrDebug
Log - Logs debug-formatted errors while preserving their result.
- ErrLog
- Logs display-formatted errors while preserving their result.
- Expect
Unchecked - Extracts successful values through an unchecked result assertion.
- Filter
- Adds fallible predicate filtering to successful results.
- FlatOk
- Flattens optional and fallible values while discarding their original error.
- Into
IsOk - Consumes a result and reduces it to success or failure.
- IsErrOr
- Tests whether a result is an error or its success value matches a predicate.
- LogDebug
Err - Logs debug-formatted errors when debug assertions are enabled.
- LogErr
- Logs display-formatted errors without changing their result.
- MapExpect
- Applies an expectation to a nested optional or fallible value.
- MapRef
- Maps a successful result through a shared reference to its value.
- NotFound
- Classifies results that contain the crateβs not-found error family.
- Unwrap
Infallible - Extracts the value from a result whose error type is uninhabited.
- Unwrap
OrErr - Returns the contained value from either variant of a
Result<T, T>.
Type AliasesΒ§
- Result
- Standard result type for core operations.