Skip to main content

TimedOperation

Trait TimedOperation 

Source
pub trait TimedOperation {
    // Required method
    async fn timed<F, R, E>(&self, operation: F) -> (Result<R, E>, Duration)
       where F: Future<Output = Result<R, E>>;
}
Expand description

Helper trait for timing model operations

Required Methods§

Source

async fn timed<F, R, E>(&self, operation: F) -> (Result<R, E>, Duration)
where F: Future<Output = Result<R, E>>,

Execute an operation and return the result with timing

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§