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

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

Associated Types

type Output

type Pipe: ParallelPipe<Source>

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

type ReduceC: Reducer<<Self::ReduceA as ReducerSend<<Self::Pipe as ParallelPipe<Source>>::Item>>::Output, Output = Self::Output>

Loading content...

Required methods

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

Loading content...

Implementations on Foreign Types

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

type Output = ()

type Pipe = ()

type ReduceA = ReduceA0

type ReduceC = ReduceC0

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

type Output = (O0,)

type Pipe = (R0::Pipe,)

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 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 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 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 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 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 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 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<A, B, C, Source, RefAItem> ParallelSink<Source> for Fork<A, B, C, RefAItem> where
    A: ParallelPipe<Source>,
    B: ParallelSink<A::Item>,
    C: ParallelSink<RefAItem>,
    RefAItem: 'static, 
[src]

type Output = (B::Output, C::Output)

type Pipe = Fork<A, B::Pipe, C::Pipe, RefAItem>

type ReduceA = ReduceA2<B::ReduceA, C::ReduceA>

type ReduceC = ReduceC2<B::ReduceC, C::ReduceC>

impl<A: ParallelPipe<Source>, B: ParallelSink<A::Item>, Source> ParallelSink<Source> for Pipe<A, B>[src]

type Output = B::Output

type Pipe = Pipe<A, B::Pipe>

type ReduceA = B::ReduceA

type ReduceC = B::ReduceC

impl<A: ParallelPipe<Source, Item = (T, U)>, B: ParallelSink<U>, Source, T, U> ParallelSink<Source> for GroupBy<A, B> where
    T: Eq + Hash + Send + 'static,
    <B::Pipe as ParallelPipe<U>>::Task: Clone + Send + 'static,
    B::ReduceA: Clone + Send + 'static,
    B::ReduceC: Clone,
    B::Output: Send + 'static, 
[src]

type Output = HashMap<T, B::Output>

type Pipe = A

type ReduceA = GroupByReducerA<<B::Pipe as ParallelPipe<U>>::Task, B::ReduceA, T, U>

type ReduceC = GroupByReducerB<B::ReduceC, T, <B::ReduceA as ReducerSend<<B::Pipe as ParallelPipe<U>>::Item>>::Output>

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

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

type Pipe = I

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

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

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

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

type Pipe = I

type ReduceA = FolderSyncReducer<I::Item, HistogramFolder<I::Item, StepA>>

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

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

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

type Pipe = I

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

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer<I::Item>>::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<<Self::ReduceA as Reducer<I::Item>>::Output>>::Output

type Pipe = I

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

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

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

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

type Pipe = I

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

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer<I::Item>>::Output, SumZeroFolder<Top<I::Item, usize>>>

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]

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

type Pipe = I

type ReduceA = FolderSyncReducer<I::Item, SumFolder<B>>

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

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

type Output = bool

type Pipe = I

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,), Output = bool> + Clone + Send + 'static, 
[src]

type Output = bool

type Pipe = I

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), Output = I::Item> + Clone + Send + 'static,
    I::Item: Send + 'static, 
[src]

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

type Pipe = I

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

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

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

type Output = ()

type Pipe = I

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

type ReduceC = PushReducer<()>

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

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

type Pipe = I

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

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

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

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

type Pipe = I

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

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

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

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

type Pipe = I

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

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

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

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

type Pipe = I

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

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer<I::Item>>::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<(), Output = B> + Clone + Send + 'static,
    F: FnMut<(B, Either<I::Item, B>), Output = B> + Clone + Send + 'static,
    B: Send + 'static, 
[src]

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

type Pipe = I

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

type ReduceC = FolderSyncReducer<<Self::ReduceA as Reducer<I::Item>>::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 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]

Loading content...