Skip to main content

ErrorKind

Trait ErrorKind 

Source
pub trait ErrorKind:
    Debug
    + Display
    + Copy {
    const OTHER: Self;

    // Required method
    fn uncategorized() -> Self;
}
Expand description

Base trait for the kind of Errors.

Error Kinds are simple types (usually flat enums) that describes the overall category of an error (with the payload being encoded in the Error type instead). Because ErrorKind implementors are simple, they are expected to implement Copy, as well as Debug and Display.

Required Associated Constants§

Source

const OTHER: Self

A Constant for the ErrorKind that is an “Other” value

Required Methods§

Source

fn uncategorized() -> Self

Returns a value of the ErrorKind that represents an uncategorized Error. This should normally not be matachable outside of the crate that defines the ErrorKind

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 ErrorKind for ErrorKind

Source§

const OTHER: Self = Self::Other

Source§

fn uncategorized() -> Self

Implementors§

Source§

impl ErrorKind for OsError

Source§

const OTHER: Self = OsError::Other