[][src]Trait reducer::Dispatcher

pub trait Dispatcher<A> {
    type Output;
    fn dispatch(&mut self, action: A) -> Self::Output;
}

Trait for types that allow dispatching actions.

Associated Types

type Output

Loading content...

Required methods

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

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]

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.

Loading content...