Trait aoko::standard::functions::ext::StdAnyExt1[][src]

pub trait StdAnyExt1<R>: Sized {
    fn measure_time(self, f: impl FnOnce(Self) -> R) -> Duration { ... }
fn measure_time_with_value(self, f: impl FnOnce(Self) -> R) -> (R, Duration) { ... }
fn measure_time_with_self(
        self,
        f: impl FnOnce(&Self) -> R
    ) -> (Self, Duration) { ... }
fn measure_time_with_mut_self(
        self,
        f: impl FnOnce(&mut Self) -> R
    ) -> (Self, Duration) { ... } }
Expand description

This trait is to implement some extension functions, which need a generic return type, for any sized type.

Provided methods

Executes the given closure block and returns the duration of elapsed time interval.

Executes the given closure block, returns the result of the closure execution and the duration of elapsed time interval.

Executes the given closure block, returns the receiver self and the duration of elapsed time interval.

Executes the given closure block, returns the receiver self and the duration of elapsed time interval.

Implementors