[][src]Struct err_context::Context

pub struct Context<M, E> { /* fields omitted */ }

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

impl<M, E> Send for Context<M, E> where
    E: Send,
    M: Send

impl<M, E> Sync for Context<M, E> where
    E: Sync,
    M: Sync

impl<M, E> Unpin for Context<M, E> where
    E: Unpin,
    M: Unpin

impl<M, E> UnwindSafe for Context<M, E> where
    E: UnwindSafe,
    M: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<E> ErrorExt for E where
    E: Error
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.