pub trait InterpolationState<A>: Clone {
    type FillSample: Clone;

    // Required method
    fn sample(&self) -> Self::FillSample;

    // Provided methods
    fn fold_sample(&mut self, _sample: Self::FillSample) { ... }
    fn fold_aggregation(&mut self, _aggregation: A) { ... }
}
Expand description

An interpolation over samples and statistical aggregations.

Required Associated Types§

source

type FillSample: Clone

The type of fill (interpolated) samples computed by the interpolation.

Required Methods§

source

fn sample(&self) -> Self::FillSample

Gets the fill (interpolated) sample of the interpolation.

Provided Methods§

source

fn fold_sample(&mut self, _sample: Self::FillSample)

Folds a sample into the interpolation.

source

fn fold_aggregation(&mut self, _aggregation: A)

Folds an aggregation into the interpolation.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<A> InterpolationState<A> for LastAggregationState<A>
where A: Clone,

§

type FillSample = A

source§

impl<T, A> InterpolationState<A> for ConstantState<T>
where T: Clone,

§

type FillSample = T

source§

impl<T, A> InterpolationState<A> for LastSampleState<T>
where T: Clone,

§

type FillSample = T