Skip to main content

Classify

Trait Classify 

Source
pub trait Classify {
    // Required method
    fn kind(&self) -> ErrorKind;
}
Expand description

Answers ErrorKind for an error type.

Prefer widening to ErrorKind::Internal over guessing: a misclassified ErrorKind::NotFound hides a real defect behind a 404.

Required Methods§

Source

fn kind(&self) -> ErrorKind

Classifies this failure for a caller that must map it onto a transport.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§