[][src]Trait asparit::Executor

pub trait Executor<'a, T1, T2 = (), T3 = ()>: Sized where
    T1: Send + 'a,
    T2: Send + 'a,
    T3: Send + 'a, 
{ type Result: Send; type Inner: Executor<'a, T2, T3, ()>; pub fn exec<P, C, R>(self, producer: P, consumer: C) -> Self::Result
    where
        P: Producer + 'a,
        C: Consumer<P::Item, Result = T1, Reducer = R> + 'a,
        R: Reducer<T1> + Send + 'a
;
pub fn exec_indexed<P, C, R>(self, producer: P, consumer: C) -> Self::Result
    where
        P: IndexedProducer + 'a,
        C: Consumer<P::Item, Result = T1, Reducer = R> + 'a,
        R: Reducer<T1> + Send + 'a
;
pub fn ready(self, value: T1) -> Self::Result;
pub fn split(self) -> (Self, Self);
pub fn join<R>(
        left: Self::Result,
        right: Self::Result,
        reducer: R
    ) -> Self::Result
    where
        R: Reducer<T1> + Send + 'a,
        T1: 'a
;
pub fn into_inner(self) -> Self::Inner;
pub fn map<O>(
        inner: <Self::Inner as Executor<'a, T2, T3, ()>>::Result,
        operation: O
    ) -> Self::Result
    where
        O: FnMut(T2) -> T1 + Send + 'a
; }

Associated Types

type Result: Send

type Inner: Executor<'a, T2, T3, ()>

Loading content...

Required methods

pub fn exec<P, C, R>(self, producer: P, consumer: C) -> Self::Result where
    P: Producer + 'a,
    C: Consumer<P::Item, Result = T1, Reducer = R> + 'a,
    R: Reducer<T1> + Send + 'a, 

pub fn exec_indexed<P, C, R>(self, producer: P, consumer: C) -> Self::Result where
    P: IndexedProducer + 'a,
    C: Consumer<P::Item, Result = T1, Reducer = R> + 'a,
    R: Reducer<T1> + Send + 'a, 

pub fn ready(self, value: T1) -> Self::Result

pub fn split(self) -> (Self, Self)

pub fn join<R>(
    left: Self::Result,
    right: Self::Result,
    reducer: R
) -> Self::Result where
    R: Reducer<T1> + Send + 'a,
    T1: 'a, 

pub fn into_inner(self) -> Self::Inner

pub fn map<O>(
    inner: <Self::Inner as Executor<'a, T2, T3, ()>>::Result,
    operation: O
) -> Self::Result where
    O: FnMut(T2) -> T1 + Send + 'a, 

Loading content...

Implementors

impl<'a, T1, T2, T3> Executor<'a, T1, T2, T3> for Sequential where
    T1: Send + 'a,
    T2: Send + 'a,
    T3: Send + 'a, 
[src]

type Result = T1

type Inner = Sequential

Loading content...