Struct Bencher

struct Bencher { ... }

Manager of the benchmarking runs.

This is fed into functions marked with #[bench] to allow for set-up & tear-down before running a piece of code repeatedly via a call to iter.

Fields

bytes: u64

Implementations

impl Bencher

fn iter<T, F>(self: &mut Self, inner: F)
where
    F: FnMut() -> T

Callback for benchmark functions to run in their body.

fn bench<F>(self: &mut Self, f: F) -> Result<Option<Summary>, String>
where
    F: FnMut(&mut Bencher) -> Result<(), String>

impl Clone for Bencher

fn clone(self: &Self) -> Bencher

impl Freeze for Bencher

impl RefUnwindSafe for Bencher

impl Send for Bencher

impl Sync for Bencher

impl Unpin for Bencher

impl UnsafeUnpin for Bencher

impl UnwindSafe for Bencher

impl<T> Any for Bencher

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Bencher

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Bencher

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Bencher

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Bencher

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Bencher

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Bencher

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Bencher

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Bencher

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>