Trait ErrorType

Source
pub trait ErrorType {
    type ErrorKind;

    // Required method
    fn new(
        kind: Self::ErrorKind,
        cause: Option<Box<Self>>,
        location: &'static Location<'static>,
    ) -> Self;
}
Expand description

Trait for error types created by declare_error_type.

Required Associated Types§

Source

type ErrorKind

The ErrorKind type.

Required Methods§

Source

fn new( kind: Self::ErrorKind, cause: Option<Box<Self>>, location: &'static Location<'static>, ) -> Self

Create a new ErrorType with the given inner kind, cause and error location.

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§