error_backtrace

Trait IntoTraced

Source
pub trait IntoTraced {
    type Value;
    type Error;

    // Required method
    fn with_trace(self) -> Result<Self::Value, Self::Error>;
}
Expand description

Allows converting a Result into a error_backtrace::Result explicitly.

Use it when you can’t just use ?, like when you need to convert into a different type of error first.

use error_backtrace::IntoTraced;
fn out() -> error_backtrace::Result<(), ()> {
    let fail: Result<(), ()> = Err(());
    fail.with_trace()
}

Required Associated Types§

Required Methods§

Source

fn with_trace(self) -> Result<Self::Value, Self::Error>

Implementations on Foreign Types§

Source§

impl<T, E> IntoTraced for Result<T, E>

Source§

type Value = T

Source§

type Error = E

Source§

fn with_trace(self) -> Result<Self::Value, Self::Error>

Implementors§