[−][src]Trait reducer::Dispatcher
Trait for types that allow dispatching actions.
Associated Types
type Output
Required methods
Loading content...Implementors
impl<A, E> Dispatcher<A> for AsyncDispatcher<A, E>
[src]
type Output = Result<(), AsyncDispatcherError>
Either confirmation that action has been dispatched or the reason why not.
fn dispatch(&mut self, action: A) -> Self::Output
[src]
Sends an action to the associated spawned Dispatcher
.
Once this call returns, the action may or may not have taken effect,
but it's guaranteed to eventually do,
unless the spawned Dispatcher
terminates in between.
impl<A, S, R> Dispatcher<A> for Store<S, R> where
S: Reducer<A>,
R: Reactor<S>,
[src]
S: Reducer<A>,
R: Reactor<S>,
type Output = Result<(), R::Error>
fn dispatch(&mut self, action: A) -> Self::Output
[src]
Updates the state via Reducer::reduce
and notifies the Reactor
,
returning the result of calling Reactor::react
with a reference
to the new state.