Trait windowed_stats::experimental::series::Sampler

source ·
pub trait Sampler<T> {
    type Error;

    // Required method
    fn fold(&mut self, sample: T) -> Result<(), Self::Error>;
}
Expand description

A type that folds samples into an aggregation or some other state.

Required Associated Types§

source

type Error

The type of error that can occur when folding samples into the sampler.

Required Methods§

source

fn fold(&mut self, sample: T) -> Result<(), Self::Error>

Implementors§

source§

impl Sampler<f32> for ArithmeticMean<f32>

source§

impl Sampler<u64> for LatchMax<u64>

source§

impl Sampler<u64> for Max<u64>

source§

impl Sampler<u64> for Sum<u64>

source§

impl Sampler<u64> for Union<u64>

source§

impl<F, P> Sampler<TimedSample<<F as Statistic>::Sample>> for TimeMatrix<F, P>
where FoldError: From<F::Error>, F: BufferStrategy<F::Aggregation, P> + Statistic, P: Interpolation<FillSample<F> = F::Sample>,

source§

impl<F, R, T> Sampler<T> for Reset<F, R>
where F: Sampler<T>,

§

type Error = <F as Sampler<T>>::Error

source§

impl<T> Sampler<TimedSample<T>> for MockTimeMatrix<T>

source§

impl<T, F, R> Sampler<T> for PostAggregation<F, R>
where F: Sampler<T>,

§

type Error = <F as Sampler<T>>::Error