pub trait ChainedError: Error + Send + 'static {
    type ErrorKind;
    fn from_kind(kind: Self::ErrorKind) -> Self
    where
        Self: Sized
;
fn with_chain<E, K>(error: E, kind: K) -> Self
    where
        Self: Sized,
        E: Error + Send + 'static,
        K: Into<Self::ErrorKind>
;
fn kind(&self) -> &Self::ErrorKind;
fn iter(&self) -> Iter<'_>Notable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = &'a dyn Error;;
fn backtrace(&self) -> Option<&Backtrace>;
fn chain_err<F, EK>(self, error: F) -> Self
    where
        F: FnOnce() -> EK,
        EK: Into<Self::ErrorKind>
; fn display_chain<'a>(&'a self) -> DisplayChain<'a, Self> { ... } }
Expand description

This trait is implemented on all the errors generated by the error_chain macro.

Associated Types

Associated kind type.

Required methods

Constructs an error from a kind, and generates a backtrace.

Constructs a chained error from another error and a kind, and generates a backtrace.

Returns the kind of the error.

Iterates over the error chain.

Returns the backtrace associated with this error.

Extends the error chain with a new entry.

Provided methods

Returns an object which implements Display for printing the full context of this error.

The full cause chain and backtrace, if present, will be printed.

Implementors