pub trait ReduceOperator:
Send
+ Sync
+ 'static {
type Acc: Clone + Send + Sync + 'static;
type Item: Clone + Send + Sync + 'static;
type Result;
// Required methods
fn identity(&self) -> Self::Acc;
fn fold(&self, acc: Self::Acc, item: Self::Item) -> Self::Acc;
fn combine(&self, left: Self::Acc, right: Self::Acc) -> Self::Acc;
fn finalize(&self, acc: Self::Acc) -> Self::Result;
}Expand description
Reduce with a custom operator struct for more complex reductions.
The operator must provide identity, combine, and finalize methods.