Skip to main content

ErrorDiagnostic

Trait ErrorDiagnostic 

Source
pub trait ErrorDiagnostic: Error + 'static {
    type Kind: ErrorKind;

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

    // Provided methods
    fn service(&self) -> Option<&'static str> { ... }
    fn is_service(&self) -> bool { ... }
    fn signature(&self) -> &'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 is_service(&self) -> bool

Check if error is service related

Source

fn signature(&self) -> &'static str

Provides a string to identify specific kind of the error

Source

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

Provides error call location

Source

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

Implementors§