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.

Object Safety§

This trait is not object safe.

Implementors§

source§

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