pub trait Error: Sized + StdError {
// Required method
fn custom<T: Display>(msg: T) -> Self;
// Provided methods
fn io_error(err: Error) -> Self { ... }
fn unsupported_data<T: Display>(msg: T) -> Self { ... }
fn invalid_enum<T: Display>(msg: T) -> Self { ... }
}
Required Methods§
Provided Methods§
fn io_error(err: Error) -> Self
fn unsupported_data<T: Display>(msg: T) -> Self
fn invalid_enum<T: Display>(msg: T) -> 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.