[−][src]Trait reducer::Dispatcher
Trait for types that allow dispatching actions.
Associated Types
type Output
Required methods
Loading content...Implementors
impl<A, O> Dispatcher<A> for AsyncDispatcher<A, O> where
A: Send + 'static,
O: Send + 'static,
[src]
A: Send + 'static,
O: Send + 'static,
type Output = BoxFuture<'static, O>
A Future that represents asynchronously dispatched actions.
Important: do not rely on the actual type, this will become an existential type once issues with rustdoc are solved.
fn dispatch(&mut self, action: A) -> Self::Output
[src]
Asynchronously sends an action to the associated spawned Dispatcher and returns a future to the result.
Important: The action is only guaranteed to be delivered if the future is polled to completion.
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 = R::Output
fn dispatch(&mut self, action: A) -> R::Output
[src]
Updates the state via Reducer<A>::reduce
and notifies the reactor,
returning the result of calling Reactor<S>::react
with a reference
to the new state.