pub struct BenchFunction {
pub name: &'static str,
pub invoke: fn(&[String]) -> Result<(), BenchError>,
}Available on crate feature
full only.Expand description
A registered benchmark function
This struct is submitted to the global registry by the #[benchmark] macro.
It contains the function’s name and a closure that invokes it.
Fields§
§name: &'static strFully-qualified name of the benchmark function (e.g., “my_crate::my_module::my_bench”)
invoke: fn(&[String]) -> Result<(), BenchError>Function that invokes the benchmark
Takes optional arguments and returns a Result. Arguments are currently unused but reserved for future parameterization.
Trait Implementations§
impl Collect for BenchFunction
Auto Trait Implementations§
impl Freeze for BenchFunction
impl RefUnwindSafe for BenchFunction
impl Send for BenchFunction
impl Sync for BenchFunction
impl Unpin for BenchFunction
impl UnwindSafe for BenchFunction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more