Skip to main content

ErrorDiagnostic

Trait ErrorDiagnostic 

Source
pub trait ErrorDiagnostic: StdError + 'static {
    type Kind: ResultKind;

    // Required method
    fn kind(&self) -> Self::Kind;

    // Provided methods
    fn service(&self) -> Option<&'static str> { ... }
    fn backtrace(&self) -> Option<&Backtrace> { ... }
    fn chain(self) -> ErrorChain<Self::Kind>
       where Self: Sized { ... }
}

Required Associated Types§

Required Methods§

Source

fn kind(&self) -> Self::Kind

Provides specific kind of the error

Provided Methods§

Source

fn service(&self) -> Option<&'static str>

Provides a string to identify responsible service

Source

fn backtrace(&self) -> Option<&Backtrace>

Provides error call location

Source

fn chain(self) -> ErrorChain<Self::Kind>
where Self: Sized,

Implementations on Foreign Types§

Source§

impl ErrorDiagnostic for Infallible

Source§

type Kind = ResultType

Source§

fn kind(&self) -> Self::Kind

Source§

impl ErrorDiagnostic for Error

Source§

type Kind = ResultType

Source§

fn kind(&self) -> Self::Kind

Implementors§