pub trait Interpolation<T>: Clone {
// Required method
fn interpolate<F>(
&self,
statistic: &mut F,
n: NonZeroUsize,
) -> Result<(), FoldError>
where F: Statistic<Sample = T>;
// Provided method
fn observe(&mut self, _sample: T) { ... }
}Expand description
A type that observes data in order to synthesize and fold interpolated samples into a
Statistic.
Interpolations mediate the aggregation of a Statistic by folding synthetic samples for
sampling periods in which no data has been observed.
Required Methods§
Sourcefn interpolate<F>(
&self,
statistic: &mut F,
n: NonZeroUsize,
) -> Result<(), FoldError>where
F: Statistic<Sample = T>,
fn interpolate<F>(
&self,
statistic: &mut F,
n: NonZeroUsize,
) -> Result<(), FoldError>where
F: Statistic<Sample = T>,
Folds an interpolated sample n times into the given Statistic.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.