DispatchStore

Trait DispatchStore 

Source
pub trait DispatchStore<S, A: Action> {
    // Required methods
    fn dispatch(&mut self, action: A) -> bool;
    fn state(&self) -> &S;
}
Expand description

Store interface used by DispatchRuntime.

Required Methods§

Source

fn dispatch(&mut self, action: A) -> bool

Dispatch an action and return whether the state changed.

Source

fn state(&self) -> &S

Get the current state.

Implementors§

Source§

impl<S, A: Action> DispatchStore<S, A> for Store<S, A>

Source§

impl<S, A: Action, M: Middleware<A>> DispatchStore<S, A> for StoreWithMiddleware<S, A, M>