pub trait FutureExt {
type Future;
// Required method
fn with_metrics<R: Recorder>(
self,
recorder: R,
) -> MetricsFuture<Self::Future, R> ⓘ;
}Expand description
Convenience trait that simplifies the construction of MetricsFuture.
Required Associated Types§
Required Methods§
Sourcefn with_metrics<R: Recorder>(
self,
recorder: R,
) -> MetricsFuture<Self::Future, R> ⓘ
fn with_metrics<R: Recorder>( self, recorder: R, ) -> MetricsFuture<Self::Future, R> ⓘ
Consumes the future, returning a new future that records the execution stats.
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.