Trait running_average::ToRate[][src]

pub trait ToRate {
    type Output;
    fn to_rate(self, duration: Duration) -> Self::Output;

Types implementing this trait can be used to calculate Measurement::rate() from. Note: This is not implemented for u64 as it cannot be converted precisely to f64 - use f64 instead for big numbers Note: Duration can be converted to f64 but will be rounded to fit in it so it is not 100% precise for max Duration

Associated Types

Required Methods