Executor

Trait Executor 

Source
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, ()>; // Required methods 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; 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; fn ready(self, value: T1) -> Self::Result; fn split(self) -> (Self, Self); fn join<R>( left: Self::Result, right: Self::Result, reducer: R, ) -> Self::Result where R: Reducer<T1> + Send + 'a, T1: 'a; fn into_inner(self) -> Self::Inner; fn map<O>( inner: <Self::Inner as Executor<'a, T2, T3, ()>>::Result, operation: O, ) -> Self::Result where O: FnMut(T2) -> T1 + Send + 'a; }

Required Associated Types§

Source

type Result: Send

Source

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

Required Methods§

Source

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,

Source

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,

Source

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

Source

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

Source

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

Source

fn into_inner(self) -> Self::Inner

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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