Trait snafu::ErrorCompat

source ·
pub trait ErrorCompat {
    // Provided method
    fn backtrace(&self) -> Option<&Backtrace> { ... }
}
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§

source

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

Returns a Backtrace that may be printed.

Implementations on Foreign Types§

source§

impl<'a, E> ErrorCompat for &'a E
where E: ErrorCompat,

source§

impl<E> ErrorCompat for Box<E>
where E: ErrorCompat,

Implementors§

source§

impl ErrorCompat for ConfigFileError

source§

impl ErrorCompat for snafu::guide::examples::backtrace::Error

source§

impl ErrorCompat for snafu::guide::examples::basic::Error