[][src]Trait amadeus_core::par_sink::ParallelSink

#[must_use]pub trait ParallelSink<Source> {
    type Output;
    type Pipe: ParallelPipe<Source>;
    type ReduceAFactory: Factory<Item = Self::ReduceA>;
    type ReduceA: ReducerSend<Item = <Self::Pipe as ParallelPipe<Source>>::Item> + Send;
    type ReduceC: Reducer<Item = <Self::ReduceA as Reducer>::Output, Output = Self::Output>;
    fn reducers(self) -> (Self::Pipe, Self::ReduceAFactory, Self::ReduceC);
}

Associated Types

type Output

type Pipe: ParallelPipe<Source>

type ReduceAFactory: Factory<Item = Self::ReduceA>

type ReduceA: ReducerSend<Item = <Self::Pipe as ParallelPipe<Source>>::Item> + Send

type ReduceC: Reducer<Item = <Self::ReduceA as Reducer>::Output, Output = Self::Output>

Loading content...

Required methods

fn reducers(self) -> (Self::Pipe, Self::ReduceAFactory, Self::ReduceC)

Loading content...

Implementations on Foreign Types

impl<Source> ParallelSink<Source> for () where
    Source: , 
[src]

impl<Source, R0: ParallelSink<Source, Output = O0>, O0> ParallelSink<Source> for (R0,) where
    Source: , 
[src]

type Output = (O0,)

type Pipe = (R0::Pipe,)

type ReduceAFactory = ReduceA1Factory<R0::ReduceAFactory>

type ReduceA = ReduceA1<R0::ReduceA>

type ReduceC = ReduceC1<R0::ReduceC>

impl<Source, R0: ParallelSink<Source, Output = O0>, R1: ParallelSink<Source, Output = O1>, O0, O1> ParallelSink<Source> for (R0, R1) where
    Source: Copy
[src]

type Output = (O0, O1)

type Pipe = (R0::Pipe, R1::Pipe)

type ReduceAFactory = ReduceA2Factory<R0::ReduceAFactory, R1::ReduceAFactory>

type ReduceA = ReduceA2<R0::ReduceA, R1::ReduceA>

type ReduceC = ReduceC2<R0::ReduceC, R1::ReduceC>

impl<Source, R0: ParallelSink<Source, Output = O0>, R1: ParallelSink<Source, Output = O1>, R2: ParallelSink<Source, Output = O2>, O0, O1, O2> ParallelSink<Source> for (R0, R1, R2) where
    Source: Copy
[src]

type Output = (O0, O1, O2)

type Pipe = (R0::Pipe, R1::Pipe, R2::Pipe)

type ReduceAFactory = ReduceA3Factory<R0::ReduceAFactory, R1::ReduceAFactory, R2::ReduceAFactory>

type ReduceA = ReduceA3<R0::ReduceA, R1::ReduceA, R2::ReduceA>

type ReduceC = ReduceC3<R0::ReduceC, R1::ReduceC, R2::ReduceC>

impl<Source, R0: ParallelSink<Source, Output = O0>, R1: ParallelSink<Source, Output = O1>, R2: ParallelSink<Source, Output = O2>, R3: ParallelSink<Source, Output = O3>, O0, O1, O2, O3> ParallelSink<Source> for (R0, R1, R2, R3) where
    Source: Copy
[src]

type Output = (O0, O1, O2, O3)

type Pipe = (R0::Pipe, R1::Pipe, R2::Pipe, R3::Pipe)

type ReduceAFactory = ReduceA4Factory<R0::ReduceAFactory, R1::ReduceAFactory, R2::ReduceAFactory, R3::ReduceAFactory>

type ReduceA = ReduceA4<R0::ReduceA, R1::ReduceA, R2::ReduceA, R3::ReduceA>

type ReduceC = ReduceC4<R0::ReduceC, R1::ReduceC, R2::ReduceC, R3::ReduceC>

impl<Source, R0: ParallelSink<Source, Output = O0>, R1: ParallelSink<Source, Output = O1>, R2: ParallelSink<Source, Output = O2>, R3: ParallelSink<Source, Output = O3>, R4: ParallelSink<Source, Output = O4>, O0, O1, O2, O3, O4> ParallelSink<Source> for (R0, R1, R2, R3, R4) where
    Source: Copy
[src]

type Output = (O0, O1, O2, O3, O4)

type Pipe = (R0::Pipe, R1::Pipe, R2::Pipe, R3::Pipe, R4::Pipe)

type ReduceAFactory = ReduceA5Factory<R0::ReduceAFactory, R1::ReduceAFactory, R2::ReduceAFactory, R3::ReduceAFactory, R4::ReduceAFactory>

type ReduceA = ReduceA5<R0::ReduceA, R1::ReduceA, R2::ReduceA, R3::ReduceA, R4::ReduceA>

type ReduceC = ReduceC5<R0::ReduceC, R1::ReduceC, R2::ReduceC, R3::ReduceC, R4::ReduceC>

impl<Source, R0: ParallelSink<Source, Output = O0>, R1: ParallelSink<Source, Output = O1>, R2: ParallelSink<Source, Output = O2>, R3: ParallelSink<Source, Output = O3>, R4: ParallelSink<Source, Output = O4>, R5: ParallelSink<Source, Output = O5>, O0, O1, O2, O3, O4, O5> ParallelSink<Source> for (R0, R1, R2, R3, R4, R5) where
    Source: Copy
[src]

type Output = (O0, O1, O2, O3, O4, O5)

type Pipe = (R0::Pipe, R1::Pipe, R2::Pipe, R3::Pipe, R4::Pipe, R5::Pipe)

type ReduceAFactory = ReduceA6Factory<R0::ReduceAFactory, R1::ReduceAFactory, R2::ReduceAFactory, R3::ReduceAFactory, R4::ReduceAFactory, R5::ReduceAFactory>

type ReduceA = ReduceA6<R0::ReduceA, R1::ReduceA, R2::ReduceA, R3::ReduceA, R4::ReduceA, R5::ReduceA>

type ReduceC = ReduceC6<R0::ReduceC, R1::ReduceC, R2::ReduceC, R3::ReduceC, R4::ReduceC, R5::ReduceC>

impl<Source, R0: ParallelSink<Source, Output = O0>, R1: ParallelSink<Source, Output = O1>, R2: ParallelSink<Source, Output = O2>, R3: ParallelSink<Source, Output = O3>, R4: ParallelSink<Source, Output = O4>, R5: ParallelSink<Source, Output = O5>, R6: ParallelSink<Source, Output = O6>, O0, O1, O2, O3, O4, O5, O6> ParallelSink<Source> for (R0, R1, R2, R3, R4, R5, R6) where
    Source: Copy
[src]

type Output = (O0, O1, O2, O3, O4, O5, O6)

type Pipe = (R0::Pipe, R1::Pipe, R2::Pipe, R3::Pipe, R4::Pipe, R5::Pipe, R6::Pipe)

type ReduceAFactory = ReduceA7Factory<R0::ReduceAFactory, R1::ReduceAFactory, R2::ReduceAFactory, R3::ReduceAFactory, R4::ReduceAFactory, R5::ReduceAFactory, R6::ReduceAFactory>

type ReduceA = ReduceA7<R0::ReduceA, R1::ReduceA, R2::ReduceA, R3::ReduceA, R4::ReduceA, R5::ReduceA, R6::ReduceA>

type ReduceC = ReduceC7<R0::ReduceC, R1::ReduceC, R2::ReduceC, R3::ReduceC, R4::ReduceC, R5::ReduceC, R6::ReduceC>

impl<Source, R0: ParallelSink<Source, Output = O0>, R1: ParallelSink<Source, Output = O1>, R2: ParallelSink<Source, Output = O2>, R3: ParallelSink<Source, Output = O3>, R4: ParallelSink<Source, Output = O4>, R5: ParallelSink<Source, Output = O5>, R6: ParallelSink<Source, Output = O6>, R7: ParallelSink<Source, Output = O7>, O0, O1, O2, O3, O4, O5, O6, O7> ParallelSink<Source> for (R0, R1, R2, R3, R4, R5, R6, R7) where
    Source: Copy
[src]

type Output = (O0, O1, O2, O3, O4, O5, O6, O7)

type Pipe = (R0::Pipe, R1::Pipe, R2::Pipe, R3::Pipe, R4::Pipe, R5::Pipe, R6::Pipe, R7::Pipe)

type ReduceAFactory = ReduceA8Factory<R0::ReduceAFactory, R1::ReduceAFactory, R2::ReduceAFactory, R3::ReduceAFactory, R4::ReduceAFactory, R5::ReduceAFactory, R6::ReduceAFactory, R7::ReduceAFactory>

type ReduceA = ReduceA8<R0::ReduceA, R1::ReduceA, R2::ReduceA, R3::ReduceA, R4::ReduceA, R5::ReduceA, R6::ReduceA, R7::ReduceA>

type ReduceC = ReduceC8<R0::ReduceC, R1::ReduceC, R2::ReduceC, R3::ReduceC, R4::ReduceC, R5::ReduceC, R6::ReduceC, R7::ReduceC>

Loading content...

Implementors

impl<I: ParallelPipe<Source>, Source> ParallelSink<Source> for Count<I>[src]

impl<I: ParallelPipe<Source>, Source> ParallelSink<Source> for Max<I> where
    I::Item: Ord + Send + 'static, 
[src]

type Output = <Self::ReduceC as Reducer>::Output

type Pipe = I

type ReduceAFactory = FolderSyncReducerFactory<I::Item, Max<I::Item>>

type ReduceA = FolderSyncReducer<I::Item, Max<I::Item>>

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer>::Output, Max<I::Item>>

impl<I: ParallelPipe<Source>, Source> ParallelSink<Source> for Min<I> where
    I::Item: Ord + Send + 'static, 
[src]

type Output = <Self::ReduceC as Reducer>::Output

type Pipe = I

type ReduceAFactory = FolderSyncReducerFactory<I::Item, Min<I::Item>>

type ReduceA = FolderSyncReducer<I::Item, Min<I::Item>>

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer>::Output, Min<I::Item>>

impl<I: ParallelPipe<Source>, Source> ParallelSink<Source> for MostFrequent<I> where
    I::Item: Clone + Hash + Eq + Send + 'static, 
[src]

impl<I: ParallelPipe<Source>, Source> ParallelSink<Source> for SampleUnstable<I> where
    I::Item: Send + 'static, 
[src]

impl<I: ParallelPipe<Source>, Source, B> ParallelSink<Source> for Sum<I, B> where
    B: Sum<I::Item> + Sum<B> + Send + 'static, 
[src]

impl<I: ParallelPipe<Source>, Source, F> ParallelSink<Source> for All<I, F> where
    F: FnMut(I::Item) -> bool + Clone + Send + 'static, 
[src]

type Output = bool

type Pipe = I

type ReduceAFactory = AllReducerFactory<I::Item, F>

type ReduceA = AllReducer<I::Item, F>

type ReduceC = BoolAndReducer

impl<I: ParallelPipe<Source>, Source, F> ParallelSink<Source> for Any<I, F> where
    F: FnMut(I::Item) -> bool + Clone + Send + 'static, 
[src]

type Output = bool

type Pipe = I

type ReduceAFactory = AnyReducerFactory<I::Item, F>

type ReduceA = AnyReducer<I::Item, F>

type ReduceC = BoolOrReducer

impl<I: ParallelPipe<Source>, Source, F> ParallelSink<Source> for Combine<I, F> where
    F: FnMut(I::Item, I::Item) -> I::Item + Clone + Send + 'static,
    I::Item: Send + 'static, 
[src]

impl<I: ParallelPipe<Source>, Source, F> ParallelSink<Source> for ForEach<I, F> where
    F: FnMut(I::Item) + Clone + Send + 'static, 
[src]

type Output = ()

type Pipe = I

type ReduceAFactory = ForEachReducerFactory<I::Item, F>

type ReduceA = ForEachReducer<I::Item, F>

type ReduceC = PushReducer<()>

impl<I: ParallelPipe<Source>, Source, F> ParallelSink<Source> for MaxBy<I, F> where
    F: FnMut(&I::Item, &I::Item) -> Ordering + Clone + Send + 'static,
    I::Item: Send + 'static, 
[src]

type Output = <Self::ReduceC as Reducer>::Output

type Pipe = I

type ReduceAFactory = FolderSyncReducerFactory<I::Item, MaxBy<I::Item, F>>

type ReduceA = FolderSyncReducer<I::Item, MaxBy<I::Item, F>>

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer>::Output, MaxBy<I::Item, F>>

impl<I: ParallelPipe<Source>, Source, F> ParallelSink<Source> for MinBy<I, F> where
    F: FnMut(&I::Item, &I::Item) -> Ordering + Clone + Send + 'static,
    I::Item: Send + 'static, 
[src]

type Output = <Self::ReduceC as Reducer>::Output

type Pipe = I

type ReduceAFactory = FolderSyncReducerFactory<I::Item, MinBy<I::Item, F>>

type ReduceA = FolderSyncReducer<I::Item, MinBy<I::Item, F>>

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer>::Output, MinBy<I::Item, F>>

impl<I: ParallelPipe<Source>, Source, F, B> ParallelSink<Source> for MaxByKey<I, F> where
    F: FnMut(&I::Item) -> B + Clone + Send + 'static,
    B: Ord + 'static,
    I::Item: Send + 'static, 
[src]

type Output = <Self::ReduceC as Reducer>::Output

type Pipe = I

type ReduceAFactory = FolderSyncReducerFactory<I::Item, MaxByKey<I::Item, F, B>>

type ReduceA = FolderSyncReducer<I::Item, MaxByKey<I::Item, F, B>>

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer>::Output, MaxByKey<I::Item, F, B>>

impl<I: ParallelPipe<Source>, Source, F, B> ParallelSink<Source> for MinByKey<I, F> where
    F: FnMut(&I::Item) -> B + Clone + Send + 'static,
    B: Ord + 'static,
    I::Item: Send + 'static, 
[src]

type Output = <Self::ReduceC as Reducer>::Output

type Pipe = I

type ReduceAFactory = FolderSyncReducerFactory<I::Item, MinByKey<I::Item, F, B>>

type ReduceA = FolderSyncReducer<I::Item, MinByKey<I::Item, F, B>>

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer>::Output, MinByKey<I::Item, F, B>>

impl<I: ParallelPipe<Source>, Source, ID, F, B> ParallelSink<Source> for Fold<I, ID, F, B> where
    ID: FnMut() -> B + Clone + Send + 'static,
    F: FnMut(B, Either<I::Item, B>) -> B + Clone + Send + 'static,
    B: Send + 'static, 
[src]

type Output = <Self::ReduceC as Reducer>::Output

type Pipe = I

type ReduceAFactory = FolderSyncReducerFactory<I::Item, FoldFolder<I::Item, ID, F, B, StepA>>

type ReduceA = FolderSyncReducer<I::Item, FoldFolder<I::Item, ID, F, B, StepA>>

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer>::Output, FoldFolder<I::Item, ID, F, B, StepB>>

impl<I: ParallelPipe<Source>, Source, T: FromParallelStream<I::Item>> ParallelSink<Source> for Collect<I, T>[src]

type Output = T

type Pipe = I

type ReduceAFactory = T::ReduceAFactory

type ReduceA = T::ReduceA

type ReduceC = T::ReduceC

impl<I: ParallelPipe<Source, Item = (A, B)>, Source, A, B> ParallelSink<Source> for MostDistinct<I> where
    A: Clone + Hash + Eq + Send + 'static,
    B: Hash + 'static, 
[src]

impl<I: ParallelPipe<Source, Item = (A, B)>, Source, A, B, ID, F, C> ParallelSink<Source> for GroupBy<I, ID, F, C> where
    A: Eq + Hash + Send + 'static,
    ID: FnMut() -> C + Clone + Send + 'static,
    F: FnMut(C, Either<B, C>) -> C + Clone + Send + 'static,
    C: Send + 'static, 
[src]

type Output = <Self::ReduceC as Reducer>::Output

type Pipe = I

type ReduceAFactory = FolderSyncReducerFactory<I::Item, GroupByFolder<A, B, ID, F, C, StepA>>

type ReduceA = FolderSyncReducer<I::Item, GroupByFolder<A, B, ID, F, C, StepA>>

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer>::Output, GroupByFolder<A, B, ID, F, C, StepB>>

Loading content...