Trait AsyncBencherExtension

Source
pub trait AsyncBencherExtension<A: AsyncExecutor> {
    // Required methods
    fn try_iter_custom<R, F>(&mut self, routine: R)
       where R: Fn(u64, WallTime) -> F,
             F: Future<Output = Result<Duration>>;
    fn try_iter_async<I, S, SF, R, F, T, TF>(
        &mut self,
        runner: A,
        setup: S,
        routine: R,
        teardown: T,
    )
       where S: Fn() -> SF,
             SF: Future<Output = Result<I>>,
             R: Fn(I, u64, WallTime, bool) -> F,
             F: Future<Output = Result<(I, Duration)>>,
             T: Fn(I) -> TF,
             TF: Future<Output = ()>;
}

Required Methods§

Source

fn try_iter_custom<R, F>(&mut self, routine: R)
where R: Fn(u64, WallTime) -> F, F: Future<Output = Result<Duration>>,

Source

fn try_iter_async<I, S, SF, R, F, T, TF>( &mut self, runner: A, setup: S, routine: R, teardown: T, )
where S: Fn() -> SF, SF: Future<Output = Result<I>>, R: Fn(I, u64, WallTime, bool) -> F, F: Future<Output = Result<(I, Duration)>>, T: Fn(I) -> TF, TF: Future<Output = ()>,

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.

Implementations on Foreign Types§

Source§

impl<A: AsyncExecutor> AsyncBencherExtension<A> for AsyncBencher<'_, '_, A>

Source§

fn try_iter_custom<R, F>(&mut self, routine: R)
where R: Fn(u64, WallTime) -> F, F: Future<Output = Result<Duration>>,

Source§

fn try_iter_async<I, S, SF, R, F, T, TF>( &mut self, runner: A, setup: S, routine: R, teardown: T, )
where S: Fn() -> SF, SF: Future<Output = Result<I>>, R: Fn(I, u64, WallTime, bool) -> F, F: Future<Output = Result<(I, Duration)>>, T: Fn(I) -> TF, TF: Future<Output = ()>,

Implementors§