pub trait Histogram<P, L, F>where
P: HistogramParams,{
// Required methods
fn labels(&self, params: &P) -> Option<Box<dyn Iterator<Item = L>>>;
fn frequency(&self, label: L, params: &P) -> Option<F>;
fn total(&self) -> F;
}
Expand description
Specifies the behaviors that are necessary to be a histogram. It is generic
and parameterized by P
, the type of parameters necessary, L
, the type
of the labels, and F
, the type that stores the frequency. Both the labels
and the frequencies need to be some sort of number.
Required Methods§
Sourcefn labels(&self, params: &P) -> Option<Box<dyn Iterator<Item = L>>>
fn labels(&self, params: &P) -> Option<Box<dyn Iterator<Item = L>>>
If possible, creates and returns an iterator for the labels for which the histogram has frequencies stored.