pub trait BenchExt<This>where
This: BenchAlg,{
// Required methods
fn one_at_a_time<Stated, Routine>(
&self,
group: &'static str,
cases: Stated,
) -> This::Bench
where Stated: IntoIterator<Item = (&'static str, Routine)>,
Routine: FnMut(BenchRounds) -> Duration + 'static;
fn together<Stated, Routine>(
&self,
group: &'static str,
cases: Stated,
) -> This::Bench
where Stated: IntoIterator<Item = (&'static str, Routine)>,
Routine: FnMut(BenchRounds) -> Duration + Send + 'static;
fn benches<Stated>(&self, stated: Stated) -> This::Bench
where Stated: IntoIterator<Item = This::Bench>;
}Expand description
Derives the ways a bench states a group.
Required Methods§
Sourcefn one_at_a_time<Stated, Routine>(
&self,
group: &'static str,
cases: Stated,
) -> This::Benchwhere
Stated: IntoIterator<Item = (&'static str, Routine)>,
Routine: FnMut(BenchRounds) -> Duration + 'static,
fn one_at_a_time<Stated, Routine>(
&self,
group: &'static str,
cases: Stated,
) -> This::Benchwhere
Stated: IntoIterator<Item = (&'static str, Routine)>,
Routine: FnMut(BenchRounds) -> Duration + 'static,
States one group whose cases are measured one at a time.
A routine stating Send is taken as well, since a case that may be measured beside others
may also be measured alone.
Sourcefn together<Stated, Routine>(
&self,
group: &'static str,
cases: Stated,
) -> This::Benchwhere
Stated: IntoIterator<Item = (&'static str, Routine)>,
Routine: FnMut(BenchRounds) -> Duration + Send + 'static,
fn together<Stated, Routine>(
&self,
group: &'static str,
cases: Stated,
) -> This::Benchwhere
Stated: IntoIterator<Item = (&'static str, Routine)>,
Routine: FnMut(BenchRounds) -> Duration + Send + 'static,
States one group whose cases are measured at the same time.
Sourcefn benches<Stated>(&self, stated: Stated) -> This::Benchwhere
Stated: IntoIterator<Item = This::Bench>,
fn benches<Stated>(&self, stated: Stated) -> This::Benchwhere
Stated: IntoIterator<Item = This::Bench>,
States every group of stated, in the order stated.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".