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-
anyhowerror value.
Structs§
- AnyError
- The
Errortype, a wrapper around a dynamic error type.
Enums§
Traits§
- Attach
Context - Provides the
contextmethod forResult. - Error
Erroris a trait representing the basic expectations for error values, i.e., values of typeEinResult<T, E>.