pub trait Reducer:
Serialize
+ DeserializeOwned
+ Clone {
type Action: Serialize + DeserializeOwned;
// Required methods
fn initial() -> Self;
fn reduce(&self, action: Self::Action) -> Self;
}Expand description
Trait for a reducer that knows how to initialize its state and reduce actions.
Required Associated Types§
type Action: Serialize + DeserializeOwned
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.