Skip to main content

Module result

Module result 

Source
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Β§

AndThenRef
Chains a fallible operation over a shared reference to a success value.
DebugInspect
Inspect Result values with release-mode elision.
ErrDebugLog
Logs debug-formatted errors while preserving their result.
ErrLog
Logs display-formatted errors while preserving their result.
ExpectUnchecked
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.
IntoIsOk
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.
LogDebugErr
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.
UnwrapInfallible
Extracts the value from a result whose error type is uninhabited.
UnwrapOrErr
Returns the contained value from either variant of a Result<T, T>.

Type AliasesΒ§

Result
Standard result type for core operations.