Skip to main content

ElapsedComputeFutureExt

Trait ElapsedComputeFutureExt 

Source
pub trait ElapsedComputeFutureExt: Future + Sized {
    // Required method
    fn with_elapsed_compute(
        self,
        elapsed_compute: Time,
    ) -> ElapsedComputeFuture<Self> ;
}
Expand description

Extension trait that wraps any Future with ElapsedComputeFuture.

Required Methods§

Source

fn with_elapsed_compute( self, elapsed_compute: Time, ) -> ElapsedComputeFuture<Self>

Wraps this future so that the time spent inside each Future::poll call is accumulated into elapsed_compute. See ElapsedComputeFuture for a full description of what is and is not measured.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<O, F: Future<Output = O>> ElapsedComputeFutureExt for F