pub trait StateManager:
Send
+ Sync
+ 'static {
// Required methods
fn get_initial_state(&self) -> JsonValue;
fn dispatch_action(&mut self, action: JsonValue) -> JsonValue;
}
Expand description
A trait that manages state for the app.
Required Methods§
Sourcefn get_initial_state(&self) -> JsonValue
fn get_initial_state(&self) -> JsonValue
Get the initial state of the app.
Sourcefn dispatch_action(&mut self, action: JsonValue) -> JsonValue
fn dispatch_action(&mut self, action: JsonValue) -> JsonValue
Apply an action to the state and return the new state.