[][src]Trait reducer::SpawnDispatcher

pub trait SpawnDispatcher {
    fn spawn_dispatcher<D, A, E>(
        &mut self,
        dispatcher: D
    ) -> Result<(AsyncDispatcher<A, E>, RemoteHandle<D::Output>), SpawnError>
    where
        D: Dispatcher<A, Output = Result<(), E>> + Sink<A, SinkError = E> + Send + 'static,
        A: Send + 'static,
        E: Send + 'static
; }

Trait for types that can spawn Dispatchers as an asynchronous task (requires async).

Required methods

fn spawn_dispatcher<D, A, E>(
    &mut self,
    dispatcher: D
) -> Result<(AsyncDispatcher<A, E>, RemoteHandle<D::Output>), SpawnError> where
    D: Dispatcher<A, Output = Result<(), E>> + Sink<A, SinkError = E> + Send + 'static,
    A: Send + 'static,
    E: Send + 'static, 

Spawns a Dispatcher as a task that will listen to actions dispatched through the AsyncDispatcher returned.

The task completes

Loading content...

Implementors

impl<S: ?Sized> SpawnDispatcher for S where
    S: Spawn
[src]

Loading content...