Struct test::bench::Bencher [−][src]
pub struct Bencher {
pub bytes: u64,
// some fields omitted
}🔬 This is a nightly-only experimental API. (
test)Expand description
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🔬 This is a nightly-only experimental API. (
test)Implementations
impl Bencher[src]
impl Bencher[src]pub fn iter<T, F>(&mut self, inner: F) where
F: FnMut() -> T, [src]
🔬 This is a nightly-only experimental API. (test)
pub fn iter<T, F>(&mut self, inner: F) where
F: FnMut() -> T, [src]🔬 This is a nightly-only experimental API. (
test)Callback for benchmark functions to run in their body.
pub fn bench<F>(&mut self, f: F) -> Option<Summary> where
F: FnMut(&mut Bencher), [src]
F: FnMut(&mut Bencher),
🔬 This is a nightly-only experimental API. (
test)Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Bencher
impl Send for Bencher
impl Sync for Bencher
impl Unpin for Bencher
impl UnwindSafe for Bencher
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more