Struct running_average::Measurement [−][src]
pub struct Measurement<T> { /* fields omitted */ }
Represent result of the calculation of running average
Methods
impl<T> Measurement<T>
[src]
impl<T> Measurement<T>
pub fn value(&self) -> &T
[src]
pub fn value(&self) -> &T
Returns pointer to internal value of the measurement which is sum of all samples within time window
pub fn unwrap(self) -> T
[src]
pub fn unwrap(self) -> T
Returns internal value of the measurement which is sum of all samples within time window consuming self
pub fn rate(&self) -> <T as ToRate>::Output where
T: Clone + ToRate,
[src]
pub fn rate(&self) -> <T as ToRate>::Output where
T: Clone + ToRate,
Calculates actual running average value based on sum of all samples and width of the time window
pub fn to_rate(self) -> <T as ToRate>::Output where
T: ToRate,
[src]
pub fn to_rate(self) -> <T as ToRate>::Output where
T: ToRate,
Calculates actual running average value based on sum of all samples and width of the time window consuming self
Trait Implementations
impl<T: Debug> Debug for Measurement<T>
[src]
impl<T: Debug> Debug for Measurement<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> Display for Measurement<T> where
T: Clone + Display + ToRate,
<T as ToRate>::Output: Into<f64>,
[src]
impl<T> Display for Measurement<T> where
T: Clone + Display + ToRate,
<T as ToRate>::Output: Into<f64>,
Auto Trait Implementations
impl<T> Send for Measurement<T> where
T: Send,
impl<T> Send for Measurement<T> where
T: Send,
impl<T> Sync for Measurement<T> where
T: Sync,
impl<T> Sync for Measurement<T> where
T: Sync,