[][src]Trait tracing_error::InstrumentResult

pub trait InstrumentResult<T> {
    type Instrumented;
    fn in_current_span(self) -> Result<T, Self::Instrumented>;
}
This is supported on feature="traced-error" only.

Extension trait for instrumenting errors in Results with SpanTraces

Associated Types

type Instrumented

This is supported on feature="traced-error" only.

The type of the wrapped error after instrumentation

Loading content...

Required methods

fn in_current_span(self) -> Result<T, Self::Instrumented>

This is supported on feature="traced-error" only.

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()
}
Loading content...

Implementations on Foreign Types

impl<T, E> InstrumentResult<T> for Result<T, E> where
    E: InstrumentError
[src]

type Instrumented = <E as InstrumentError>::Instrumented

This is supported on feature="traced-error" only.
Loading content...

Implementors

Loading content...