Module context

Module context 

Source
Expand description

Error context management and accumulation Helpers for attaching rich context metadata to errors.

Key features:

See the crate-level docs for a high-level overview of when to prefer these utilities over bare Result transformations.

Functionsยง

accumulate_context
Wraps an error with multiple context entries at once.
context_accumulator
Creates a reusable closure that wraps errors with multiple contexts.
context_fn
Creates a reusable closure that wraps errors with a fixed context.
error_pipeline
Creates an ErrorPipeline from a result.
extract_context
Extracts all context entries from a ComposableError.
format_error_chain
Formats a ComposableError as a human-readable error chain.
with_context
Wraps an error with a single context entry.
with_context_result
Transforms a Result by adding context to any error.