FutureExt

Trait FutureExt 

Source
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§

Source

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.

Implementors§

Source§

impl<T: Future> FutureExt for T