Error

Trait Error 

Source
pub trait Error: StdError + Sized {
    // Required methods
    fn custom<T>(msg: T) -> Self
       where T: Display;
    fn context<C>(self, context: C) -> Self
       where C: Display;
}
Expand description

De/serialization error

Required Methods§

Source

fn custom<T>(msg: T) -> Self
where T: Display,

Returns a custom error from given message

Source

fn context<C>(self, context: C) -> Self
where C: Display,

Wraps current error in given 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.

Implementations on Foreign Types§

Source§

impl Error for Error

Source§

fn custom<T>(msg: T) -> Self
where T: Display,

Source§

fn context<C>(self, context: C) -> Self
where C: Display,

Implementors§