pub struct Error { /* private fields */ }Expand description
An error type that wraps an inner type-erased boxed std::error::Error or an Exn frame.
In that, it’s similar to anyhow, but with support for tracking the call site and trees of errors.
§Warning: source() information is stringified and type-erased
All source() values when created with Error::from_error() are turned into frames,
but lose their type information completely.
This is because they are only seen as reference and thus can’t be stored.
§The auto-chain-error feature
If it’s enabled, this type is merely a wrapper around ChainedError. This happens automatically
so applications that require this don’t have to go through an extra conversion.
When both the tree-error and auto-chain-error features are enabled, the tree-error
behavior takes precedence and this type uses the tree-based representation.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Return the first source of an Exn error, or the source of a boxed error.