Trait metrics::SummaryStats

source ·
pub trait SummaryStats<T> {
    // Required methods
    fn count(&self) -> u64;
    fn sum(&self) -> Option<T>;
    fn min(&self) -> Option<T>;
    fn max(&self) -> Option<T>;
    fn average(&self) -> Option<T>;
}

Required Methods§

source

fn count(&self) -> u64

Count of data points that tracked.

source

fn sum(&self) -> Option<T>

Sum of all data points. Returns None if count is zero.

source

fn min(&self) -> Option<T>

Minimum value of data points. Returns None if count is zero.

source

fn max(&self) -> Option<T>

Maximum value of data points. Returns None if count is zero.

source

fn average(&self) -> Option<T>

Average value of data points. Returns None if count is zero.

Implementors§