Trait tracing_error::InstrumentResult [−][src]
pub trait InstrumentResult<T> {
type Instrumented;
fn in_current_span(self) -> Result<T, Self::Instrumented>;
}
This is supported on crate feature
traced-error
only.Expand description
Extension trait for instrumenting errors in Result
s with SpanTrace
s
Associated Types
type Instrumented
type Instrumented
The type of the wrapped error after instrumentation
Required methods
fn in_current_span(self) -> Result<T, Self::Instrumented>
fn in_current_span(self) -> Result<T, Self::Instrumented>
Instrument an Error by bundling it with a SpanTrace
Examples
use tracing_error::{TracedError, InstrumentResult};
fn do_thing() -> Result<(), TracedError<io::Error>> {
fallible_fn().in_current_span()
}
Implementations on Foreign Types
type Instrumented = <E as InstrumentError>::Instrumented
type Instrumented = <E as InstrumentError>::Instrumented
This is supported on crate feature
traced-error
only.This is supported on crate feature
traced-error
only.