TraceFutureExt

Trait TraceFutureExt 

Source
pub trait TraceFutureExt: Sized + Future {
    // Provided method
    fn trace<'a, C, S>(
        self,
        args: TraceFutureArgs<'a, C, S>,
    ) -> TraceFuture<'a, Self, C, S>
       where C: CategoryString,
             S: AsTraceStrRef { ... }
}
Expand description

Extension trait for tracing futures.

Provided Methods§

Source

fn trace<'a, C, S>( self, args: TraceFutureArgs<'a, C, S>, ) -> TraceFuture<'a, Self, C, S>

Wraps a Future in a TraceFuture.

Example:

future.trace(trace_future_args!(c"category", c"name")).await;

Which is equivalent to:

TraceFuture::new(trace_future_args!(c"category", c"name"), future).await;

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<T> TraceFutureExt for T
where T: Future,