Module error

Module error 

Available on crate feature error only.
Expand description

Error handling utilities.

The module re-exports items from the anyhow crate. Some items are renamed to prevent conflicts. For instance, anyhow::Context is exported as AttachContext, since Context is already used for other purposes.

Macros§

bail
Return early with an error.
ensure
Return early with an error if a condition is not satisfied.
format_err
Construct an ad-hoc error from a string or existing non-anyhow error value.

Structs§

AnyError
The Error type, a wrapper around a dynamic error type.

Enums§

Result
Result is a type that represents either success (Ok) or failure (Err).

Traits§

AttachContext
Provides the context method for Result.
Error
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.

Type Aliases§

AnyResult
A Result using AnyError as the error type.