Skip to main content

Metric

Trait Metric 

Source
pub trait Metric {
    // Required method
    fn measure_fn(f: impl FnMut()) -> u64;
}
Expand description

This trait allows to define strategy for measuring metric of interest about the code

Required Methods§

Source

fn measure_fn(f: impl FnMut()) -> u64

Measures current metric on a given code

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.

Implementors§