pub trait Reducer<S: StateSchema>: Send + Sync {
// Required method
fn reduce(&self, current: &S, update: &S) -> S;
}Expand description
Reducer trait for merging state updates
Reducers define how state updates are merged into the current state.
This enables patterns like add_messages which appends rather than replaces.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".