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§
Sourcefn trace<'a, C, S>(
self,
args: TraceFutureArgs<'a, C, S>,
) -> TraceFuture<'a, Self, C, S>where
C: CategoryString,
S: AsTraceStrRef,
fn trace<'a, C, S>(
self,
args: TraceFutureArgs<'a, C, S>,
) -> TraceFuture<'a, Self, C, S>where
C: CategoryString,
S: AsTraceStrRef,
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.