Skip to main content

ContextError

Trait ContextError 

Source
pub trait ContextError<E> {
    // Required method
    fn context<M: AlienErrorData + Clone + Debug + Serialize>(
        self,
        meta: M,
    ) -> AlienError<M>;
}
Expand description

Extension trait for adding context directly to AlienError instances

Required Methods§

Source

fn context<M: AlienErrorData + Clone + Debug + Serialize>( self, meta: M, ) -> AlienError<M>

Add context to an AlienError, wrapping it with a new error

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E> ContextError<E> for AlienError<E>
where E: AlienErrorData + Clone + Debug + Serialize + 'static + Send + Sync,