Skip to main content

DispatchStore

Trait DispatchStore 

Source
pub trait DispatchStore<S, A>
where 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> DispatchStore<S, A> for Store<S, A>
where A: Action,

Source§

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