[][src]Trait opentelemetry::api::trace::futures::FutureExt

pub trait FutureExt: Sized {
    fn with_context(self, otel_cx: OpenTelemetryContext) -> WithContext<Self>

Important traits for WithContext<T>

impl<T: Future> Future for WithContext<T> type Output = T::Output;
{ ... }
fn with_current_context(self) -> WithContext<Self>

Important traits for WithContext<T>

impl<T: Future> Future for WithContext<T> type Output = T::Output;
{ ... } }

Extension trait allowing futures, streams, and sinks to be traced with a span.

Provided methods

fn with_context(self, otel_cx: OpenTelemetryContext) -> WithContext<Self>

Important traits for WithContext<T>

impl<T: Future> Future for WithContext<T> type Output = T::Output;

Attaches the provided Context to this type, returning a WithContext wrapper.

When the wrapped type is a future, stream, or sink, the attached context will be set as current while it is being polled.

fn with_current_context(self) -> WithContext<Self>

Important traits for WithContext<T>

impl<T: Future> Future for WithContext<T> type Output = T::Output;

Attaches the current Context to this type, returning a WithContext wrapper.

When the wrapped type is a future, stream, or sink, the attached context will be set as the default while it is being polled.

Loading content...

Implementors

impl<T: Sized> FutureExt for T[src]

Loading content...