pub struct Context<D: Display + Send + Sync + 'static> { /* fields omitted */ }
Expand description
An error with context around it.
The context is intended to be a human-readable, user-facing explanation for the
error that has occurred. The underlying error is not assumed to be end-user-relevant
information.
The Display
impl for Context
only prints the human-readable context, while the
Debug
impl also prints the underlying error.
Creates a new context without an underlying error message.
Returns a reference to the context provided with this error.
Maps Context<D>
to Context<T>
by applying a function to the contained context.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Returns a reference to the Backtrace
carried by this failure, if it
carries one. Read more
Wraps this failure in a compatibility wrapper that implements
std::error::Error
. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.