[][src]Trait tracing_error::InstrumentError

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

Extension trait for instrumenting errors 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) -> Self::Instrumented

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

Instrument an Error by bundling it with a SpanTrace

Examples

use tracing_error::{TracedError, InstrumentError};

fn wrap_error<E>(e: E) -> TracedError<E>
where
    E: std::error::Error + Send + Sync + 'static
{
    e.in_current_span()
}
Loading content...

Implementors

impl<E> InstrumentError for E where
    TracedError<E>: From<E>, 
[src]

type Instrumented = TracedError<E>

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