[][src]Trait amadeus_core::dist_iter::Reducer

pub trait Reducer {
    type Item;
    type Output;
    fn push(&mut self, item: Self::Item) -> bool;
fn ret(self) -> Self::Output; }

Associated Types

type Item

type Output

Loading content...

Required methods

fn push(&mut self, item: Self::Item) -> bool

fn ret(self) -> Self::Output

Loading content...

Implementors

impl Reducer for BoolAndReducer[src]

type Item = bool

type Output = bool

impl Reducer for BoolOrReducer[src]

type Item = bool

type Output = bool

impl Reducer for ReduceA0[src]

type Item = Sum0

type Output = ()

impl Reducer for ReduceB0[src]

type Item = ()

type Output = ()

impl<A> Reducer for CountReducer<A>[src]

type Item = A

type Output = usize

impl<A> Reducer for MostFrequentReducer<A> where
    A: Clone + Hash + Eq
[src]

type Item = A

type Output = Top<A, usize>

impl<A> Reducer for SampleUnstableReducer<A>[src]

type Item = A

type Output = SampleUnstable<A>

impl<A, B> Reducer for MostDistinctReducer<A, B> where
    A: Clone + Hash + Eq,
    B: Hash
[src]

type Item = (A, B)

type Output = Top<A, HyperLogLogMagnitude<B>>

impl<A, B> Reducer for SumReducer<A, B> where
    B: Sum<A> + Sum
[src]

type Item = A

type Output = B

impl<A, B, F> Reducer for CombineReducer<A, B, F> where
    Option<B>: From<A>,
    F: Combiner<B>, 
[src]

type Item = A

type Output = Option<B>

impl<A, F> Reducer for AllReducer<A, F> where
    F: FnMut(A) -> bool
[src]

type Item = A

type Output = bool

impl<A, F> Reducer for AnyReducer<A, F> where
    F: FnMut(A) -> bool
[src]

type Item = A

type Output = bool

impl<A, F> Reducer for ForEachReducer<A, F> where
    F: FnMut(A) + Clone
[src]

type Item = A

type Output = ()

impl<A, ID, F, B> Reducer for FoldReducerA<A, ID, F, B> where
    ID: FnMut() -> B + Clone,
    F: FnMut(B, Either<A, B>) -> B + Clone
[src]

type Item = A

type Output = B

impl<A, ID, F, B> Reducer for FoldReducerB<A, ID, F, B> where
    ID: FnMut() -> B + Clone,
    F: FnMut(B, Either<A, B>) -> B + Clone
[src]

type Item = B

type Output = B

impl<A, T: Push<A>> Reducer for PushReducer<A, T>[src]

type Item = A

type Output = T

impl<A: Reducer> Reducer for ReduceA1<A>[src]

type Item = Sum1<A::Item>

type Output = (A::Output,)

impl<A: Reducer> Reducer for ReduceB1<A>[src]

type Item = (A::Item,)

type Output = (A::Output,)

impl<A: Reducer, B: Reducer> Reducer for ReduceA2<A, B>[src]

type Item = Sum2<A::Item, B::Item>

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

impl<A: Reducer, B: Reducer> Reducer for ReduceB2<A, B>[src]

type Item = (A::Item, B::Item)

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

impl<A: Reducer, B: Reducer, C: Reducer> Reducer for ReduceA3<A, B, C>[src]

type Item = Sum3<A::Item, B::Item, C::Item>

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

impl<A: Reducer, B: Reducer, C: Reducer> Reducer for ReduceB3<A, B, C>[src]

type Item = (A::Item, B::Item, C::Item)

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

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer> Reducer for ReduceA4<A, B, C, D>[src]

type Item = Sum4<A::Item, B::Item, C::Item, D::Item>

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

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer> Reducer for ReduceB4<A, B, C, D>[src]

type Item = (A::Item, B::Item, C::Item, D::Item)

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

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer, E: Reducer> Reducer for ReduceA5<A, B, C, D, E>[src]

type Item = Sum5<A::Item, B::Item, C::Item, D::Item, E::Item>

type Output = (A::Output, B::Output, C::Output, D::Output, E::Output)

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer, E: Reducer> Reducer for ReduceB5<A, B, C, D, E>[src]

type Item = (A::Item, B::Item, C::Item, D::Item, E::Item)

type Output = (A::Output, B::Output, C::Output, D::Output, E::Output)

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer, E: Reducer, F: Reducer> Reducer for ReduceA6<A, B, C, D, E, F>[src]

type Item = Sum6<A::Item, B::Item, C::Item, D::Item, E::Item, F::Item>

type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output)

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer, E: Reducer, F: Reducer> Reducer for ReduceB6<A, B, C, D, E, F>[src]

type Item = (A::Item, B::Item, C::Item, D::Item, E::Item, F::Item)

type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output)

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer, E: Reducer, F: Reducer, G: Reducer> Reducer for ReduceA7<A, B, C, D, E, F, G>[src]

type Item = Sum7<A::Item, B::Item, C::Item, D::Item, E::Item, F::Item, G::Item>

type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output)

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer, E: Reducer, F: Reducer, G: Reducer> Reducer for ReduceB7<A, B, C, D, E, F, G>[src]

type Item = (A::Item, B::Item, C::Item, D::Item, E::Item, F::Item, G::Item)

type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output)

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer, E: Reducer, F: Reducer, G: Reducer, H: Reducer> Reducer for ReduceA8<A, B, C, D, E, F, G, H>[src]

type Item = Sum8<A::Item, B::Item, C::Item, D::Item, E::Item, F::Item, G::Item, H::Item>

type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output)

impl<A: Reducer, B: Reducer, C: Reducer, D: Reducer, E: Reducer, F: Reducer, G: Reducer, H: Reducer> Reducer for ReduceB8<A, B, C, D, E, F, G, H>[src]

type Item = (A::Item, B::Item, C::Item, D::Item, E::Item, F::Item, G::Item, H::Item)

type Output = (A::Output, B::Output, C::Output, D::Output, E::Output, F::Output, G::Output, H::Output)

impl<A: IntoIterator<Item = B>, T: Extend<B>, B> Reducer for ExtendReducer<A, T>[src]

type Item = A

type Output = T

impl<R, B> Reducer for NonzeroReducer<R> where
    R: Reducer<Output = Zeroable<B>>, 
[src]

type Item = R::Item

type Output = B

impl<R: Reducer> Reducer for OptionReducer<R>[src]

type Item = Option<R::Item>

type Output = Option<R::Output>

impl<R: Reducer, E> Reducer for ResultReducer<R, E>[src]

type Item = Result<R::Item, E>

type Output = Result<R::Output, E>

impl<R: Reducer, T> Reducer for IntoReducer<R, T> where
    R::Output: Into<T>, 
[src]

type Item = R::Item

type Output = T

Loading content...