pub struct Context<D: Display + Send + Sync + 'static> { /* private fields */ }
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.
Implementations§
Trait Implementations§
Source§impl<D: Display + Send + Sync + 'static> Fail for Context<D>
impl<D: Display + Send + Sync + 'static> Fail for Context<D>
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moreAuto Trait Implementations§
impl<D> !Freeze for Context<D>
impl<D> !RefUnwindSafe for Context<D>
impl<D> Send for Context<D>
impl<D> Sync for Context<D>
impl<D> Unpin for Context<D>where
D: Unpin,
impl<D> !UnwindSafe for Context<D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more