Skip to main content

Reducer

Trait Reducer 

Source
pub trait Reducer: Send + Sync {
    // Required method
    fn reduce(&self, current: &Value, update: &Value) -> Result<Value>;
}
Expand description

A reducer combines old and new values during state updates. Critical for correctness during parallel execution.

Required Methods§

Source

fn reduce(&self, current: &Value, update: &Value) -> Result<Value>

Combine the current value with the new value

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§