pub struct BoxContext<M, E: ?Sized> { /* private fields */ }
Expand description
Additional context for boxed errors.
This has the same purpose and the same functionality as Context
. It is a separate type for
technical reasons in implementation.
Implementations§
Source§impl<M, E: ?Sized> BoxContext<M, E>
impl<M, E: ?Sized> BoxContext<M, E>
Trait Implementations§
Source§impl<M: Debug + Display> Error for BoxContext<M, dyn Error>
impl<M: Debug + Display> Error for BoxContext<M, dyn Error>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<M: Debug + Display> Error for BoxContext<M, dyn Error + Send>
impl<M: Debug + Display> Error for BoxContext<M, dyn Error + Send>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<M: Debug + Display> Error for BoxContext<M, dyn Error + Send + Sync>
impl<M: Debug + Display> Error for BoxContext<M, dyn Error + Send + Sync>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<M: Debug + Display> Error for BoxContext<M, dyn Error + Sync>
impl<M: Debug + Display> Error for BoxContext<M, dyn Error + Sync>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<M, E> Freeze for BoxContext<M, E>
impl<M, E> RefUnwindSafe for BoxContext<M, E>
impl<M, E> Send for BoxContext<M, E>
impl<M, E> Sync for BoxContext<M, E>
impl<M, E> Unpin for BoxContext<M, E>
impl<M, E> UnwindSafe for BoxContext<M, E>
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
Source§impl<E> ErrorExt for Ewhere
E: Error,
impl<E> ErrorExt for Ewhere
E: Error,
Source§fn context<M>(self, msg: M) -> Context<M, E>where
M: Display,
fn context<M>(self, msg: M) -> Context<M, E>where
M: Display,
Wraps the error into another layer of context. Read more
Source§fn chain(&self) -> Chain<'_> ⓘwhere
E: 'static,
fn chain(&self) -> Chain<'_> ⓘwhere
E: 'static,
Iterates over all the layers of the error. Read more
Source§impl<E> Fail for E
impl<E> Fail for E
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
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 more