Trait InstrumentAwait

Source
pub trait InstrumentAwait: Future + Sized {
    // Provided methods
    fn instrument_await(
        self,
        span: impl Into<Span>,
    ) -> Instrumented<Self, false>  { ... }
    fn verbose_instrument_await(
        self,
        span: impl Into<Span>,
    ) -> Instrumented<Self, true>  { ... }
}
Expand description

Attach spans to a future to be traced in the await-tree.

Provided Methods§

Source

fn instrument_await(self, span: impl Into<Span>) -> Instrumented<Self, false>

Instrument the future with a span.

Source

fn verbose_instrument_await( self, span: impl Into<Span>, ) -> Instrumented<Self, true>

Instrument the future with a verbose span, which is optionally enabled based on the registry configuration.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<F> InstrumentAwait for F
where F: Future,