pub trait Reducer<T>:
Send
+ Sync
+ 'static {
// Required method
fn reduce(&self, current: T, update: T) -> T;
}Expand description
Combines a current value and an incoming update into the next value.
Implementors must be deterministic — the merge function runs
inside CompiledGraph::execute_loop and a reducer that depends on
outside state (random RNG, wall-clock time, …) breaks crash-resume
reproducibility.