[−][src]Trait tracing_futures::WithSubscriber
Extension trait allowing futures, streams, and sinks to be instrumented with
a tracing
Subscriber
.
Provided methods
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>
impl<T: Future> Future for WithDispatch<T> type Output = T::Output;
where
S: Into<Dispatch>,
[src]
Notable traits for WithDispatch<T>
impl<T: Future> Future for WithDispatch<T> type Output = T::Output;
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper.
When the wrapped type is a future, stream, or sink, the attached subscriber will be set as the default while it is being polled. When the wrapped type is an executor, the subscriber will be set as the default for any futures spawned on that executor.
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>
impl<T: Future> Future for WithDispatch<T> type Output = T::Output;
[src]
Notable traits for WithDispatch<T>
impl<T: Future> Future for WithDispatch<T> type Output = T::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper.
When the wrapped type is a future, stream, or sink, the attached subscriber will be set as the default while it is being polled. When the wrapped type is an executor, the subscriber will be set as the default for any futures spawned on that executor.
This can be used to propagate the current dispatcher context when spawning a new future.