Error

Trait Error 

Source
pub trait Error {
    // Required method
    fn custom<T>(msg: T) -> Self
       where T: Display;
}
Expand description

The base trait serialization error types must implement.

Required Methods§

Source

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

Returns an error derived from msg: impl Display.

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 Infallible

Source§

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

Source§

impl Error for String

Source§

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

Implementors§