pub trait AggregateFunction: Send + Sync {
// Required methods
fn create_accumulator(&self) -> Vec<u8> ⓘ;
fn add(&self, accumulator: Vec<u8>, value: Vec<u8>) -> Vec<u8> ⓘ;
fn get_result(&self, accumulator: Vec<u8>) -> Vec<u8> ⓘ;
fn merge(&self, acc1: Vec<u8>, acc2: Vec<u8>) -> Vec<u8> ⓘ;
}Expand description
Trait for aggregate functions.
Required Methods§
Sourcefn create_accumulator(&self) -> Vec<u8> ⓘ
fn create_accumulator(&self) -> Vec<u8> ⓘ
Create initial accumulator.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".