pub trait Accumulator:
Default
+ Clone
+ Send {
type Input;
type Output: ResultToI64 + ResultToArrow;
// Required methods
fn add(&mut self, value: Self::Input);
fn merge(&mut self, other: &Self);
fn result(&self) -> Self::Output;
fn is_empty(&self) -> bool;
}Expand description
Accumulator state for aggregations.
This is the state stored per window in the state store. Different aggregators store different types of accumulators.
Implementors should derive rkyv::Archive, rkyv::Serialize, and
rkyv::Deserialize for zero-copy serialization on the hot path.
Required Associated Types§
Sourcetype Output: ResultToI64 + ResultToArrow
type Output: ResultToI64 + ResultToArrow
The output type produced by the aggregation.
Required 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.