Skip to main content

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".

Implementations on Foreign Types§

Source§

impl Error for !

Source§

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

Source§

impl Error for String

Source§

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

Implementors§