[][src]Trait amadeus::DistributedIterator

pub trait DistributedIterator where
    <Self::Task as Consumer>::Item == Self::Item
{ type Item; type Task: Consumer + ProcessSend; fn size_hint(&self) -> (usize, Option<usize>);
fn next_task(&mut self) -> Option<Self::Task>; fn inspect<F>(self, f: F) -> Inspect<Self, F>
    where
        F: FnMut(&Self::Item) + Clone + ProcessSend
, { ... }
fn update<F>(self, f: F) -> Update<Self, F>
    where
        F: FnMut(&mut Self::Item) + Clone + ProcessSend
, { ... }
fn map<B, F>(self, f: F) -> Map<Self, F>
    where
        F: FnMut(Self::Item) -> B + Clone + ProcessSend
, { ... }
fn flat_map<B, F>(self, f: F) -> FlatMap<Self, F>
    where
        B: IntoIterator,
        F: FnMut(Self::Item) -> B + Clone + ProcessSend
, { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
    where
        F: FnMut(&Self::Item) -> bool + Clone + ProcessSend
, { ... }
fn chain<C>(
        self,
        chain: C
    ) -> Chain<Self, <C as IntoDistributedIterator>::Iter>
    where
        C: IntoDistributedIterator<Item = Self::Item>
, { ... }
fn reduce<B, R1F, R1, R2>(
        self,
        pool: &impl ProcessPool,
        reduce1factory: R1F,
        reduce2: R2
    ) -> B
    where
        R1: ReducerA<Item = Self::Item>,
        R1F: ReduceFactory<Reducer = R1>,
        R2: Reducer<Item = <R1 as ReducerA>::Output, Output = B>
, { ... }
fn multi<IteratorA, IteratorB, ReducerA, ReducerB, A, B>(
        self,
        pool: &impl ProcessPool,
        reducer_a: ReducerA,
        reducer_b: ReducerB
    ) -> (A, B)
    where
        IteratorA: DistributedIteratorMulti<Self::Item>,
        IteratorB: DistributedIteratorMulti<&'a Self::Item> + 'static,
        ReducerA: DistributedReducer<IteratorA, Self::Item, A>,
        ReducerB: DistributedReducer<IteratorB, &'a Self::Item, B>,
        Self::Item: 'static
, { ... }
fn for_each<F>(self, pool: &impl ProcessPool, f: F)
    where
        F: FnMut(Self::Item) + Clone + ProcessSend,
        Self::Item: 'static
, { ... }
fn fold<ID, F, B>(self, pool: &impl ProcessPool, identity: ID, op: F) -> B
    where
        B: ProcessSend,
        F: FnMut(B, Either<Self::Item, B>) -> B + Clone + ProcessSend,
        ID: FnMut() -> B + Clone + ProcessSend,
        Self::Item: 'static
, { ... }
fn count(self, pool: &impl ProcessPool) -> usize
    where
        Self::Item: 'static
, { ... }
fn sum<S>(self, pool: &impl ProcessPool) -> S
    where
        S: Sum<Self::Item> + Sum<S> + ProcessSend,
        Self::Item: 'static
, { ... }
fn combine<F>(self, pool: &impl ProcessPool, f: F) -> Option<Self::Item>
    where
        F: FnMut(Self::Item, Self::Item) -> Self::Item + Clone + ProcessSend,
        Self::Item: ProcessSend
, { ... }
fn max(self, pool: &impl ProcessPool) -> Option<Self::Item>
    where
        Self::Item: Ord,
        Self::Item: ProcessSend
, { ... }
fn max_by<F>(self, pool: &impl ProcessPool, f: F) -> Option<Self::Item>
    where
        F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + ProcessSend,
        Self::Item: ProcessSend
, { ... }
fn max_by_key<F, B>(
        self,
        pool: &impl ProcessPool,
        f: F
    ) -> Option<Self::Item>
    where
        B: Ord + 'static,
        F: FnMut(&Self::Item) -> B + Clone + ProcessSend,
        Self::Item: ProcessSend
, { ... }
fn min(self, pool: &impl ProcessPool) -> Option<Self::Item>
    where
        Self::Item: Ord,
        Self::Item: ProcessSend
, { ... }
fn min_by<F>(self, pool: &impl ProcessPool, f: F) -> Option<Self::Item>
    where
        F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + ProcessSend,
        Self::Item: ProcessSend
, { ... }
fn min_by_key<F, B>(
        self,
        pool: &impl ProcessPool,
        f: F
    ) -> Option<Self::Item>
    where
        B: Ord + 'static,
        F: FnMut(&Self::Item) -> B + Clone + ProcessSend,
        Self::Item: ProcessSend
, { ... }
fn most_frequent(
        self,
        pool: &impl ProcessPool,
        n: usize,
        probability: f64,
        tolerance: f64
    ) -> Top<Self::Item, usize>
    where
        Self::Item: Hash,
        Self::Item: Eq,
        Self::Item: Clone,
        Self::Item: ProcessSend
, { ... }
fn most_distinct<A, B>(
        self,
        pool: &impl ProcessPool,
        n: usize,
        probability: f64,
        tolerance: f64,
        error_rate: f64
    ) -> Top<A, HyperLogLogMagnitude<B>>
    where
        A: Hash + Eq + Clone + ProcessSend,
        B: Hash + 'static,
        Self: DistributedIterator<Item = (A, B)>
, { ... }
fn sample_unstable(
        self,
        pool: &impl ProcessPool,
        samples: usize
    ) -> SampleUnstable<Self::Item>
    where
        Self::Item: ProcessSend
, { ... }
fn all<F>(self, pool: &impl ProcessPool, f: F) -> bool
    where
        F: FnMut(Self::Item) -> bool + Clone + ProcessSend,
        Self::Item: 'static
, { ... }
fn any<F>(self, pool: &impl ProcessPool, f: F) -> bool
    where
        F: FnMut(Self::Item) -> bool + Clone + ProcessSend,
        Self::Item: 'static
, { ... }
fn collect<B>(self, pool: &impl ProcessPool) -> B
    where
        B: FromDistributedIterator<Self::Item>,
        <B as FromDistributedIterator<Self::Item>>::ReduceA: ProcessSend
, { ... } }

Associated Types

Loading content...

Required methods

fn size_hint(&self) -> (usize, Option<usize>)

fn next_task(&mut self) -> Option<Self::Task>

Loading content...

Provided methods

fn inspect<F>(self, f: F) -> Inspect<Self, F> where
    F: FnMut(&Self::Item) + Clone + ProcessSend

fn update<F>(self, f: F) -> Update<Self, F> where
    F: FnMut(&mut Self::Item) + Clone + ProcessSend

fn map<B, F>(self, f: F) -> Map<Self, F> where
    F: FnMut(Self::Item) -> B + Clone + ProcessSend

fn flat_map<B, F>(self, f: F) -> FlatMap<Self, F> where
    B: IntoIterator,
    F: FnMut(Self::Item) -> B + Clone + ProcessSend

fn filter<F>(self, f: F) -> Filter<Self, F> where
    F: FnMut(&Self::Item) -> bool + Clone + ProcessSend

fn chain<C>(self, chain: C) -> Chain<Self, <C as IntoDistributedIterator>::Iter> where
    C: IntoDistributedIterator<Item = Self::Item>, 

fn reduce<B, R1F, R1, R2>(
    self,
    pool: &impl ProcessPool,
    reduce1factory: R1F,
    reduce2: R2
) -> B where
    R1: ReducerA<Item = Self::Item>,
    R1F: ReduceFactory<Reducer = R1>,
    R2: Reducer<Item = <R1 as ReducerA>::Output, Output = B>, 

fn multi<IteratorA, IteratorB, ReducerA, ReducerB, A, B>(
    self,
    pool: &impl ProcessPool,
    reducer_a: ReducerA,
    reducer_b: ReducerB
) -> (A, B) where
    IteratorA: DistributedIteratorMulti<Self::Item>,
    IteratorB: DistributedIteratorMulti<&'a Self::Item> + 'static,
    ReducerA: DistributedReducer<IteratorA, Self::Item, A>,
    ReducerB: DistributedReducer<IteratorB, &'a Self::Item, B>,
    Self::Item: 'static, 

fn for_each<F>(self, pool: &impl ProcessPool, f: F) where
    F: FnMut(Self::Item) + Clone + ProcessSend,
    Self::Item: 'static, 

fn fold<ID, F, B>(self, pool: &impl ProcessPool, identity: ID, op: F) -> B where
    B: ProcessSend,
    F: FnMut(B, Either<Self::Item, B>) -> B + Clone + ProcessSend,
    ID: FnMut() -> B + Clone + ProcessSend,
    Self::Item: 'static, 

fn count(self, pool: &impl ProcessPool) -> usize where
    Self::Item: 'static, 

fn sum<S>(self, pool: &impl ProcessPool) -> S where
    S: Sum<Self::Item> + Sum<S> + ProcessSend,
    Self::Item: 'static, 

fn combine<F>(self, pool: &impl ProcessPool, f: F) -> Option<Self::Item> where
    F: FnMut(Self::Item, Self::Item) -> Self::Item + Clone + ProcessSend,
    Self::Item: ProcessSend

fn max(self, pool: &impl ProcessPool) -> Option<Self::Item> where
    Self::Item: Ord,
    Self::Item: ProcessSend

fn max_by<F>(self, pool: &impl ProcessPool, f: F) -> Option<Self::Item> where
    F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + ProcessSend,
    Self::Item: ProcessSend

fn max_by_key<F, B>(self, pool: &impl ProcessPool, f: F) -> Option<Self::Item> where
    B: Ord + 'static,
    F: FnMut(&Self::Item) -> B + Clone + ProcessSend,
    Self::Item: ProcessSend

fn min(self, pool: &impl ProcessPool) -> Option<Self::Item> where
    Self::Item: Ord,
    Self::Item: ProcessSend

fn min_by<F>(self, pool: &impl ProcessPool, f: F) -> Option<Self::Item> where
    F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + ProcessSend,
    Self::Item: ProcessSend

fn min_by_key<F, B>(self, pool: &impl ProcessPool, f: F) -> Option<Self::Item> where
    B: Ord + 'static,
    F: FnMut(&Self::Item) -> B + Clone + ProcessSend,
    Self::Item: ProcessSend

fn most_frequent(
    self,
    pool: &impl ProcessPool,
    n: usize,
    probability: f64,
    tolerance: f64
) -> Top<Self::Item, usize> where
    Self::Item: Hash,
    Self::Item: Eq,
    Self::Item: Clone,
    Self::Item: ProcessSend

fn most_distinct<A, B>(
    self,
    pool: &impl ProcessPool,
    n: usize,
    probability: f64,
    tolerance: f64,
    error_rate: f64
) -> Top<A, HyperLogLogMagnitude<B>> where
    A: Hash + Eq + Clone + ProcessSend,
    B: Hash + 'static,
    Self: DistributedIterator<Item = (A, B)>, 

fn sample_unstable(
    self,
    pool: &impl ProcessPool,
    samples: usize
) -> SampleUnstable<Self::Item> where
    Self::Item: ProcessSend

fn all<F>(self, pool: &impl ProcessPool, f: F) -> bool where
    F: FnMut(Self::Item) -> bool + Clone + ProcessSend,
    Self::Item: 'static, 

fn any<F>(self, pool: &impl ProcessPool, f: F) -> bool where
    F: FnMut(Self::Item) -> bool + Clone + ProcessSend,
    Self::Item: 'static, 

fn collect<B>(self, pool: &impl ProcessPool) -> B where
    B: FromDistributedIterator<Self::Item>,
    <B as FromDistributedIterator<Self::Item>>::ReduceA: ProcessSend

Loading content...

Implementations on Foreign Types

impl<T> DistributedIterator for ImplDistributedIterator<T> where
    T: 'static, 
[src]

impl<A, B> DistributedIterator for Sum2<A, B> where
    A: DistributedIterator,
    B: DistributedIterator<Item = <A as DistributedIterator>::Item>, 
[src]

Loading content...

Implementors

impl DistributedIterator for Never[src]

impl<A, B> DistributedIterator for Chain<A, B> where
    A: DistributedIterator,
    B: DistributedIterator<Item = <A as DistributedIterator>::Item>, 
[src]

impl<I> DistributedIterator for IterIter<I> where
    I: Iterator,
    <I as Iterator>::Item: ProcessSend
[src]

impl<I, F> DistributedIterator for Filter<I, F> where
    F: FnMut(&<I as DistributedIterator>::Item) -> bool + Clone + ProcessSend,
    I: DistributedIterator
[src]

impl<I, F> DistributedIterator for Inspect<I, F> where
    F: FnMut(&<I as DistributedIterator>::Item) + Clone + ProcessSend,
    I: DistributedIterator
[src]

impl<I, F> DistributedIterator for Update<I, F> where
    F: FnMut(&mut <I as DistributedIterator>::Item) + Clone + ProcessSend,
    I: DistributedIterator
[src]

impl<I, F, R> DistributedIterator for FlatMap<I, F> where
    F: FnMut(<I as DistributedIterator>::Item) -> R + Clone + ProcessSend,
    I: DistributedIterator,
    R: IntoIterator
[src]

impl<I, F, R> DistributedIterator for Map<I, F> where
    F: FnMut(<I as DistributedIterator>::Item) -> R + Clone + ProcessSend,
    I: DistributedIterator
[src]

type Item = R

type Task = MapConsumer<<I as DistributedIterator>::Task, F>

impl<I, T, E, U> DistributedIterator for IntoIter<I, U> where
    I: DistributedIterator<Item = Result<T, E>>,
    T: Into<U>,
    U: 'static, 
[src]

type Item = Result<U, E>

type Task = IntoConsumer<I::Task, U>

Loading content...