pub trait ErrorCompat {
    fn backtrace(&self) -> Option<&Backtrace> { ... }
    fn iter_chain(&self) -> ChainCompat<'_>Notable traits for ChainCompat<'a>impl<'a> Iterator for ChainCompat<'a>    type Item = &'a dyn Error;
   where
        Self: AsErrorSource
, { ... } }
Expand description

Backports changes to the Error trait to versions of Rust lacking them.

It is recommended to always call these methods explicitly so that it is easy to replace usages of this trait when you start supporting a newer version of Rust.

ErrorCompat::backtrace(&error); // Recommended
error.backtrace();              // Discouraged

Provided Methods

Returns a Backtrace that may be printed.

Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source.

To omit the current error and only traverse its sources, use skip(1).

Implementations on Foreign Types

Implementors