Trait error_backtrace::ErrorBacktrace

source ·
pub trait ErrorBacktrace {
    // Required method
    fn is_error(&self) -> bool;

    // Provided method
    fn trace(self) -> Self
       where Self: Sized { ... }
}

Required Methods§

source

fn is_error(&self) -> bool

Provided Methods§

source

fn trace(self) -> Self
where Self: Sized,

Examples found in repository?
examples/example.rs (line 10)
9
10
11
12
13
fn maybe_error() -> Result<(), ()> {
    let value = error_source().trace()?;
    // Do something with value
    Ok(())
}

Implementations on Foreign Types§

source§

impl<T1> ErrorBacktrace for Option<T1>

source§

fn is_error(&self) -> bool

source§

impl<T1, T2> ErrorBacktrace for Result<T1, T2>

source§

fn is_error(&self) -> bool

Implementors§