fxfs_trace

Trait TraceFutureExt

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

Extension trait for tracing futures.

Provided Methods§

Source

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

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,