InstrumentFuture

Trait InstrumentFuture 

Source
pub trait InstrumentFuture: Sized + Future {
    // Provided method
    fn instrument(
        self,
        span_desc: &'static SpanMetadata,
    ) -> InstrumentedFuture<Self>  { ... }
}
Expand description

Trait for adding instrumentation to futures

Provided Methods§

Source

fn instrument( self, span_desc: &'static SpanMetadata, ) -> InstrumentedFuture<Self>

Instrument this future with the given span metadata

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> InstrumentFuture for F
where F: Future,