Trait StateManager

Source
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§

Source

fn get_initial_state(&self) -> JsonValue

Get the initial state of the app.

Source

fn dispatch_action(&mut self, action: JsonValue) -> JsonValue

Apply an action to the state and return the new state.

Implementors§