pub trait Reducer<A>{
// Required method
fn reduce(&mut self, action: A) -> Vec<A>;
}Expand description
State reducer.
§Abstraction Goals
- Separation of concerns: This is only intended to apply actions ot state.
- Make state changes trivialy testable.
- Deterministic state changes.
- Deterministic observe changes of interest (retuned actions).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.