[−][src]Struct err_context::Context
Additional level of context, wrapping some error inside itself.
This is produced by the context
and implements the additional (outer)
layer in the chain. Any number of contexts can be chained together.
Implementations
impl<M, E> Context<M, E>
[src]
pub fn new(msg: M, error: E) -> Self
[src]
A direct constructor for the context.
More usually created by the context
, but allowing for construction
directly without importing the trait.
pub fn into_inner(self) -> E
[src]
Extracts the inner error, peeling off the outer layer.
Trait Implementations
impl<M: Clone, E: Clone> Clone for Context<M, E>
[src]
impl<M: Copy, E: Copy> Copy for Context<M, E>
[src]
impl<M: Debug, E: Debug> Debug for Context<M, E>
[src]
impl<M: Display, E> Display for Context<M, E>
[src]
impl<M: Debug + Display, E: Error + 'static> Error for Context<M, E>
[src]
Auto Trait Implementations
impl<M, E> RefUnwindSafe for Context<M, E> where
E: RefUnwindSafe,
M: RefUnwindSafe,
E: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, E> Send for Context<M, E> where
E: Send,
M: Send,
E: Send,
M: Send,
impl<M, E> Sync for Context<M, E> where
E: Sync,
M: Sync,
E: Sync,
M: Sync,
impl<M, E> Unpin for Context<M, E> where
E: Unpin,
M: Unpin,
E: Unpin,
M: Unpin,
impl<M, E> UnwindSafe for Context<M, E> where
E: UnwindSafe,
M: UnwindSafe,
E: UnwindSafe,
M: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> ErrorExt for E where
E: Error,
[src]
E: Error,
fn context<M>(Self, M) -> Context<M, E> where
M: Display,
[src]
M: Display,
fn chain(&Self) -> Chain<'_>ⓘ where
E: 'static,
[src]
E: 'static,
fn find_source<T: Error + 'static>(&self) -> Option<&T> where
Self: 'static,
[src]
Self: 'static,
fn display<S: Display>(&self, separator: S) -> DisplayChain<'_, S> where
Self: 'static,
[src]
Self: 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,