Trait FutureExt

pub trait FutureExt: Sized + Future {
    // Provided method
    fn with_span(self, span: Span) -> WithSpan<Self>  { ... }
}
Expand description

Extension trait for instrumenting futures with telemetry spans.

This trait provides methods to attach telemetry spans to futures, ensuring that the spans are entered every time the future is polled.

Provided Methods§

fn with_span(self, span: Span) -> WithSpan<Self>

Instruments a future with the provided Span.

The attached Span will be entered every time it is polled.

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§

§

impl<T> FutureExt for T
where T: Future,