CommonErrorExt

Trait CommonErrorExt 

Source
pub trait CommonErrorExt {
    // Required methods
    fn msg<M: Display + Debug + Send + Sync + 'static>(msg: M) -> Self;
    fn other<E: StdError + Send + Sync + 'static>(error: E) -> Self;
    fn from_anyhow(e: Error) -> Self;
    fn from_boxed(error: Box<dyn StdError + Send + Sync + 'static>) -> Self;
}

Required Methods§

Source

fn msg<M: Display + Debug + Send + Sync + 'static>(msg: M) -> Self

Source

fn other<E: StdError + Send + Sync + 'static>(error: E) -> Self

Source

fn from_anyhow(e: Error) -> Self

Source

fn from_boxed(error: Box<dyn StdError + Send + Sync + 'static>) -> Self

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<S> CommonErrorExt for S
where S: From<CommonError> + Display + Debug + Send + Sync + 'static,