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()
}