ErrContext

Trait ErrContext 

Source
pub trait ErrContext {
    // Required method
    fn context<M>(self, msg: M) -> ErrorContext
       where M: Into<SharedString>;
}
Expand description

A helper trait for annotating any Error with an ErrorContext

Required Methods§

Source

fn context<M>(self, msg: M) -> ErrorContext
where M: Into<SharedString>,

Wrap this error into a new ErrorContext error, annotated with the specified context

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> ErrContext for T
where T: Error + Send + Sync + 'static,