[][src]Trait amadeus_core::par_pipe::ParallelPipe

#[must_use]pub trait ParallelPipe<Input> {
    type Output;
    type Task: PipeTask<Input, Output = Self::Output> + Send;
    fn task(&self) -> Self::Task;

    fn inspect<F>(self, f: F) -> Inspect<Self, F>
    where
        F: FnMut(&Self::Output) + Clone + Send + 'static,
        Self: Sized
, { ... }
fn update<F>(self, f: F) -> Update<Self, F>
    where
        F: FnMut(&mut Self::Output) + Clone + Send + 'static,
        Self: Sized
, { ... }
fn map<B, F>(self, f: F) -> Map<Self, F>
    where
        F: FnMut(Self::Output) -> B + Clone + Send + 'static,
        Self: Sized
, { ... }
fn flat_map<B, F>(self, f: F) -> FlatMap<Self, F>
    where
        F: FnMut(Self::Output) -> B + Clone + Send + 'static,
        B: Stream,
        Self: Sized
, { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
    where
        F: FnMut(&Self::Output) -> bool + Clone + Send + 'static,
        Self: Sized
, { ... }
fn cloned<'a, T>(self) -> Cloned<Self, T, Input>
    where
        T: Clone + 'a,
        Input: 'a,
        Self: ParallelPipe<&'a Input, Output = &'a T> + Sized
, { ... }
fn left_join<K, V1, V2>(
        self,
        right: impl IntoIterator<Item = (K, V2)>
    ) -> LeftJoin<Self, K, V1, V2>
    where
        K: Eq + Hash + Clone + Send + 'static,
        V1: 'static,
        V2: Clone + Send + 'static,
        Self: ParallelPipe<Input, Output = (K, V1)> + Sized
, { ... }
fn inner_join<K, V1, V2>(
        self,
        right: impl IntoIterator<Item = (K, V2)>
    ) -> InnerJoin<Self, K, V1, V2>
    where
        K: Eq + Hash + Clone + Send + 'static,
        V1: 'static,
        V2: Clone + Send + 'static,
        Self: ParallelPipe<Input, Output = (K, V1)> + Sized
, { ... }
fn pipe<S>(self, sink: S) -> Pipe<Self, S>
    where
        S: ParallelSink<Self::Output>,
        Self: Sized
, { ... }
fn fork<A, B, RefAItem>(
        self,
        sink: A,
        sink_ref: B
    ) -> Fork<Self, A, B, &'static Self::Output>
    where
        A: ParallelSink<Self::Output>,
        B: for<'a> ParallelSink<&'a Self::Output>,
        Self: Sized
, { ... }
fn for_each<F>(self, f: F) -> ForEach<Self, F>
    where
        F: FnMut(Self::Output) + Clone + Send + 'static,
        Self: Sized
, { ... }
fn fold<ID, F, B>(self, identity: ID, op: F) -> Fold<Self, ID, F, B>
    where
        ID: FnMut() -> B + Clone + Send + 'static,
        F: FnMut(B, Either<Self::Output, B>) -> B + Clone + Send + 'static,
        B: Send + 'static,
        Self: Sized
, { ... }
fn group_by<S, A, B>(self, sink: S) -> GroupBy<Self, S>
    where
        A: Eq + Hash + Send + 'static,
        S: ParallelSink<B>,
        <S::Pipe as ParallelPipe<B>>::Task: Clone + Send + 'static,
        S::ReduceA: 'static,
        S::ReduceC: Clone,
        S::Done: Send + 'static,
        Self: ParallelPipe<Input, Output = (A, B)> + Sized
, { ... }
fn histogram(self) -> Histogram<Self>
    where
        Self::Output: Hash + Ord + Send + 'static,
        Self: Sized
, { ... }
fn sort_n_by<F>(self, n: usize, cmp: F) -> Sort<Self, F>
    where
        F: Fn(&Self::Output, &Self::Output) -> Ordering + Clone + Send + 'static,
        Self::Output: Clone + Send + 'static,
        Self: Sized
, { ... }
fn count(self) -> Count<Self>
    where
        Self: Sized
, { ... }
fn sum<B>(self) -> Sum<Self, B>
    where
        B: Sum<Self::Output> + Sum<B> + Send + 'static,
        Self: Sized
, { ... }
fn mean(self) -> Mean<Self>
    where
        Self: ParallelPipe<Input, Output = f64> + Sized
, { ... }
fn stddev(self) -> StdDev<Self>
    where
        Self: ParallelPipe<Input, Output = f64> + Sized
, { ... }
fn combine<F>(self, f: F) -> Combine<Self, F>
    where
        F: FnMut(Self::Output, Self::Output) -> Self::Output + Clone + Send + 'static,
        Self::Output: Send + 'static,
        Self: Sized
, { ... }
fn max(self) -> Max<Self>
    where
        Self::Output: Ord + Send + 'static,
        Self: Sized
, { ... }
fn max_by<F>(self, f: F) -> MaxBy<Self, F>
    where
        F: FnMut(&Self::Output, &Self::Output) -> Ordering + Clone + Send + 'static,
        Self::Output: Send + 'static,
        Self: Sized
, { ... }
fn max_by_key<F, B>(self, f: F) -> MaxByKey<Self, F>
    where
        F: FnMut(&Self::Output) -> B + Clone + Send + 'static,
        B: Ord + 'static,
        Self::Output: Send + 'static,
        Self: Sized
, { ... }
fn min(self) -> Min<Self>
    where
        Self::Output: Ord + Send + 'static,
        Self: Sized
, { ... }
fn min_by<F>(self, f: F) -> MinBy<Self, F>
    where
        F: FnMut(&Self::Output, &Self::Output) -> Ordering + Clone + Send + 'static,
        Self::Output: Send + 'static,
        Self: Sized
, { ... }
fn min_by_key<F, B>(self, f: F) -> MinByKey<Self, F>
    where
        F: FnMut(&Self::Output) -> B + Clone + Send + 'static,
        B: Ord + 'static,
        Self::Output: Send + 'static,
        Self: Sized
, { ... }
fn most_frequent(
        self,
        n: usize,
        probability: f64,
        tolerance: f64
    ) -> MostFrequent<Self>
    where
        Self::Output: Hash + Eq + Clone + Send + 'static,
        Self: Sized
, { ... }
fn most_distinct<A, B>(
        self,
        n: usize,
        probability: f64,
        tolerance: f64,
        error_rate: f64
    ) -> MostDistinct<Self>
    where
        Self: ParallelPipe<Input, Output = (A, B)> + Sized,
        A: Hash + Eq + Clone + Send + 'static,
        B: Hash + 'static
, { ... }
fn sample_unstable(self, samples: usize) -> SampleUnstable<Self>
    where
        Self::Output: Send + 'static,
        Self: Sized
, { ... }
fn all<F>(self, f: F) -> All<Self, F>
    where
        F: FnMut(Self::Output) -> bool + Clone + Send + 'static,
        Self: Sized
, { ... }
fn any<F>(self, f: F) -> Any<Self, F>
    where
        F: FnMut(Self::Output) -> bool + Clone + Send + 'static,
        Self: Sized
, { ... }
fn collect<B>(self) -> Collect<Self, B>
    where
        B: FromParallelStream<Self::Output>,
        Self: Sized
, { ... } }

Associated Types

type Output

type Task: PipeTask<Input, Output = Self::Output> + Send

Loading content...

Required methods

fn task(&self) -> Self::Task

Loading content...

Provided methods

fn inspect<F>(self, f: F) -> Inspect<Self, F> where
    F: FnMut(&Self::Output) + Clone + Send + 'static,
    Self: Sized

fn update<F>(self, f: F) -> Update<Self, F> where
    F: FnMut(&mut Self::Output) + Clone + Send + 'static,
    Self: Sized

fn map<B, F>(self, f: F) -> Map<Self, F> where
    F: FnMut(Self::Output) -> B + Clone + Send + 'static,
    Self: Sized

fn flat_map<B, F>(self, f: F) -> FlatMap<Self, F> where
    F: FnMut(Self::Output) -> B + Clone + Send + 'static,
    B: Stream,
    Self: Sized

fn filter<F>(self, f: F) -> Filter<Self, F> where
    F: FnMut(&Self::Output) -> bool + Clone + Send + 'static,
    Self: Sized

fn cloned<'a, T>(self) -> Cloned<Self, T, Input> where
    T: Clone + 'a,
    Input: 'a,
    Self: ParallelPipe<&'a Input, Output = &'a T> + Sized

fn left_join<K, V1, V2>(
    self,
    right: impl IntoIterator<Item = (K, V2)>
) -> LeftJoin<Self, K, V1, V2> where
    K: Eq + Hash + Clone + Send + 'static,
    V1: 'static,
    V2: Clone + Send + 'static,
    Self: ParallelPipe<Input, Output = (K, V1)> + Sized

fn inner_join<K, V1, V2>(
    self,
    right: impl IntoIterator<Item = (K, V2)>
) -> InnerJoin<Self, K, V1, V2> where
    K: Eq + Hash + Clone + Send + 'static,
    V1: 'static,
    V2: Clone + Send + 'static,
    Self: ParallelPipe<Input, Output = (K, V1)> + Sized

fn pipe<S>(self, sink: S) -> Pipe<Self, S> where
    S: ParallelSink<Self::Output>,
    Self: Sized

fn fork<A, B, RefAItem>(
    self,
    sink: A,
    sink_ref: B
) -> Fork<Self, A, B, &'static Self::Output> where
    A: ParallelSink<Self::Output>,
    B: for<'a> ParallelSink<&'a Self::Output>,
    Self: Sized

fn for_each<F>(self, f: F) -> ForEach<Self, F> where
    F: FnMut(Self::Output) + Clone + Send + 'static,
    Self: Sized

fn fold<ID, F, B>(self, identity: ID, op: F) -> Fold<Self, ID, F, B> where
    ID: FnMut() -> B + Clone + Send + 'static,
    F: FnMut(B, Either<Self::Output, B>) -> B + Clone + Send + 'static,
    B: Send + 'static,
    Self: Sized

fn group_by<S, A, B>(self, sink: S) -> GroupBy<Self, S> where
    A: Eq + Hash + Send + 'static,
    S: ParallelSink<B>,
    <S::Pipe as ParallelPipe<B>>::Task: Clone + Send + 'static,
    S::ReduceA: 'static,
    S::ReduceC: Clone,
    S::Done: Send + 'static,
    Self: ParallelPipe<Input, Output = (A, B)> + Sized

fn histogram(self) -> Histogram<Self> where
    Self::Output: Hash + Ord + Send + 'static,
    Self: Sized

fn sort_n_by<F>(self, n: usize, cmp: F) -> Sort<Self, F> where
    F: Fn(&Self::Output, &Self::Output) -> Ordering + Clone + Send + 'static,
    Self::Output: Clone + Send + 'static,
    Self: Sized

fn count(self) -> Count<Self> where
    Self: Sized

fn sum<B>(self) -> Sum<Self, B> where
    B: Sum<Self::Output> + Sum<B> + Send + 'static,
    Self: Sized

fn mean(self) -> Mean<Self> where
    Self: ParallelPipe<Input, Output = f64> + Sized

fn stddev(self) -> StdDev<Self> where
    Self: ParallelPipe<Input, Output = f64> + Sized

fn combine<F>(self, f: F) -> Combine<Self, F> where
    F: FnMut(Self::Output, Self::Output) -> Self::Output + Clone + Send + 'static,
    Self::Output: Send + 'static,
    Self: Sized

fn max(self) -> Max<Self> where
    Self::Output: Ord + Send + 'static,
    Self: Sized

fn max_by<F>(self, f: F) -> MaxBy<Self, F> where
    F: FnMut(&Self::Output, &Self::Output) -> Ordering + Clone + Send + 'static,
    Self::Output: Send + 'static,
    Self: Sized

fn max_by_key<F, B>(self, f: F) -> MaxByKey<Self, F> where
    F: FnMut(&Self::Output) -> B + Clone + Send + 'static,
    B: Ord + 'static,
    Self::Output: Send + 'static,
    Self: Sized

fn min(self) -> Min<Self> where
    Self::Output: Ord + Send + 'static,
    Self: Sized

fn min_by<F>(self, f: F) -> MinBy<Self, F> where
    F: FnMut(&Self::Output, &Self::Output) -> Ordering + Clone + Send + 'static,
    Self::Output: Send + 'static,
    Self: Sized

fn min_by_key<F, B>(self, f: F) -> MinByKey<Self, F> where
    F: FnMut(&Self::Output) -> B + Clone + Send + 'static,
    B: Ord + 'static,
    Self::Output: Send + 'static,
    Self: Sized

fn most_frequent(
    self,
    n: usize,
    probability: f64,
    tolerance: f64
) -> MostFrequent<Self> where
    Self::Output: Hash + Eq + Clone + Send + 'static,
    Self: Sized

fn most_distinct<A, B>(
    self,
    n: usize,
    probability: f64,
    tolerance: f64,
    error_rate: f64
) -> MostDistinct<Self> where
    Self: ParallelPipe<Input, Output = (A, B)> + Sized,
    A: Hash + Eq + Clone + Send + 'static,
    B: Hash + 'static, 

fn sample_unstable(self, samples: usize) -> SampleUnstable<Self> where
    Self::Output: Send + 'static,
    Self: Sized

fn all<F>(self, f: F) -> All<Self, F> where
    F: FnMut(Self::Output) -> bool + Clone + Send + 'static,
    Self: Sized

fn any<F>(self, f: F) -> Any<Self, F> where
    F: FnMut(Self::Output) -> bool + Clone + Send + 'static,
    Self: Sized

fn collect<B>(self) -> Collect<Self, B> where
    B: FromParallelStream<Self::Output>,
    Self: Sized

Loading content...

Implementations on Foreign Types

impl<Input> ParallelPipe<Input> for () where
    Input: , 
[src]

type Output = Sum0

type Task = ()

impl<Input, I0: ParallelPipe<Input>> ParallelPipe<Input> for (I0,) where
    Input: , 
[src]

type Output = Sum1<I0::Output>

type Task = (I0::Task,)

impl<Input, I0: ParallelPipe<Input>, I1: ParallelPipe<Input>> ParallelPipe<Input> for (I0, I1) where
    Input: Copy
[src]

type Output = Sum2<I0::Output, I1::Output>

type Task = (I0::Task, I1::Task)

impl<Input, I0: ParallelPipe<Input>, I1: ParallelPipe<Input>, I2: ParallelPipe<Input>> ParallelPipe<Input> for (I0, I1, I2) where
    Input: Copy
[src]

type Output = Sum3<I0::Output, I1::Output, I2::Output>

type Task = (I0::Task, I1::Task, I2::Task)

impl<Input, I0: ParallelPipe<Input>, I1: ParallelPipe<Input>, I2: ParallelPipe<Input>, I3: ParallelPipe<Input>> ParallelPipe<Input> for (I0, I1, I2, I3) where
    Input: Copy
[src]

type Output = Sum4<I0::Output, I1::Output, I2::Output, I3::Output>

type Task = (I0::Task, I1::Task, I2::Task, I3::Task)

impl<Input, I0: ParallelPipe<Input>, I1: ParallelPipe<Input>, I2: ParallelPipe<Input>, I3: ParallelPipe<Input>, I4: ParallelPipe<Input>> ParallelPipe<Input> for (I0, I1, I2, I3, I4) where
    Input: Copy
[src]

type Output = Sum5<I0::Output, I1::Output, I2::Output, I3::Output, I4::Output>

type Task = (I0::Task, I1::Task, I2::Task, I3::Task, I4::Task)

impl<Input, I0: ParallelPipe<Input>, I1: ParallelPipe<Input>, I2: ParallelPipe<Input>, I3: ParallelPipe<Input>, I4: ParallelPipe<Input>, I5: ParallelPipe<Input>> ParallelPipe<Input> for (I0, I1, I2, I3, I4, I5) where
    Input: Copy
[src]

type Output = Sum6<I0::Output, I1::Output, I2::Output, I3::Output, I4::Output, I5::Output>

type Task = (I0::Task, I1::Task, I2::Task, I3::Task, I4::Task, I5::Task)

impl<Input, I0: ParallelPipe<Input>, I1: ParallelPipe<Input>, I2: ParallelPipe<Input>, I3: ParallelPipe<Input>, I4: ParallelPipe<Input>, I5: ParallelPipe<Input>, I6: ParallelPipe<Input>> ParallelPipe<Input> for (I0, I1, I2, I3, I4, I5, I6) where
    Input: Copy
[src]

type Output = Sum7<I0::Output, I1::Output, I2::Output, I3::Output, I4::Output, I5::Output, I6::Output>

type Task = (I0::Task, I1::Task, I2::Task, I3::Task, I4::Task, I5::Task, I6::Task)

impl<Input, I0: ParallelPipe<Input>, I1: ParallelPipe<Input>, I2: ParallelPipe<Input>, I3: ParallelPipe<Input>, I4: ParallelPipe<Input>, I5: ParallelPipe<Input>, I6: ParallelPipe<Input>, I7: ParallelPipe<Input>> ParallelPipe<Input> for (I0, I1, I2, I3, I4, I5, I6, I7) where
    Input: Copy
[src]

type Output = Sum8<I0::Output, I1::Output, I2::Output, I3::Output, I4::Output, I5::Output, I6::Output, I7::Output>

type Task = (I0::Task, I1::Task, I2::Task, I3::Task, I4::Task, I5::Task, I6::Task, I7::Task)

impl<A: ParallelPipe<Input>, B: ParallelPipe<Input, Output = A::Output>, Input> ParallelPipe<Input> for Sum2<A, B>[src]

type Output = A::Output

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

Loading content...

Implementors

impl<'a, P, Input, T: 'a> ParallelPipe<&'a Input> for Cloned<P, T, Input> where
    P: ParallelPipe<&'a Input, Output = &'a T>,
    T: Clone
[src]

type Output = T

type Task = ClonedTask<P::Task>

impl<A, B, C, Input, RefAItem> ParallelPipe<Input> for Fork<A, B, C, RefAItem> where
    A: ParallelPipe<Input>,
    B: ParallelPipe<A::Output>,
    C: ParallelPipe<RefAItem>,
    RefAItem: 'static, 
[src]

type Output = Sum2<B::Output, C::Output>

type Task = JoinTask<A::Task, B::Task, C::Task, RefAItem>

impl<A: ParallelPipe<Input>, B: ParallelPipe<A::Output>, Input> ParallelPipe<Input> for Pipe<A, B>[src]

type Output = B::Output

type Task = JoinTask<A::Task, B::Task>

impl<Item> ParallelPipe<Item> for Identity[src]

type Output = Item

type Task = IdentityTask

impl<P, K, V1, V2, Input> ParallelPipe<Input> for InnerJoin<P, K, V1, V2> where
    P: ParallelPipe<Input, Output = (K, V1)>,
    K: Eq + Hash + Clone + Send + 'static,
    V1: 'static,
    V2: Clone + Send + 'static, 
[src]

type Output = (K, ImplIter<V1>, ImplIter<V2>)

type Task = <FilterMapSync<P, InnerJoinClosure<K, V1, V2>> as ParallelPipe<Input>>::Task

impl<P, K, V1, V2, Input> ParallelPipe<Input> for LeftJoin<P, K, V1, V2> where
    P: ParallelPipe<Input, Output = (K, V1)>,
    K: Eq + Hash + Clone + Send + 'static,
    V1: 'static,
    V2: Clone + Send + 'static, 
[src]

type Output = (K, V1, ImplIter<V2>)

type Task = <MapSync<P, LeftJoinClosure<K, V1, V2>> as ParallelPipe<Input>>::Task

impl<P: ParallelPipe<Input>, F, Input> ParallelPipe<Input> for Filter<P, F> where
    F: for<'a> FnMut<(&'a P::Output,), Output = bool> + Clone + Send + 'static, 
[src]

type Output = P::Output

type Task = FilterTask<P::Task, F>

impl<P: ParallelPipe<Input>, F, Input> ParallelPipe<Input> for Inspect<P, F> where
    F: for<'a> FnMut<(&'a P::Output,), Output = ()> + Clone + Send + 'static, 
[src]

type Output = P::Output

type Task = InspectTask<P::Task, F>

impl<P: ParallelPipe<Input>, F, Input> ParallelPipe<Input> for Update<P, F> where
    F: for<'a> FnMut<(&'a mut P::Output,), Output = ()> + Clone + Send + 'static, 
[src]

type Output = P::Output

type Task = UpdateTask<P::Task, F>

impl<P: ParallelPipe<Input>, F, R, Input> ParallelPipe<Input> for FilterMapSync<P, F> where
    F: FnMut<(P::Output,), Output = Option<R>> + Clone + Send + 'static, 
[src]

type Output = R

type Task = FilterMapSyncTask<P::Task, F>

impl<P: ParallelPipe<Input>, F, R, Input> ParallelPipe<Input> for Map<P, F> where
    F: FnMut<(P::Output,), Output = R> + Clone + Send + 'static, 
[src]

type Output = R

type Task = MapTask<P::Task, F>

impl<P: ParallelPipe<Input>, F, R, Input> ParallelPipe<Input> for MapSync<P, F> where
    F: FnMut<(P::Output,), Output = R> + Clone + Send + 'static, 
[src]

type Output = R

type Task = MapSyncTask<P::Task, F>

impl<P: ParallelPipe<Input>, F, R: Iterator, Input> ParallelPipe<Input> for FlatMapSync<P, F> where
    F: FnMut<(P::Output,), Output = R> + Clone + Send + 'static, 
[src]

type Output = R::Item

type Task = FlatMapSyncTask<P::Task, F>

impl<P: ParallelPipe<Input>, F, R: Stream, Input> ParallelPipe<Input> for FlatMap<P, F> where
    F: FnMut<(P::Output,), Output = R> + Clone + Send + 'static, 
[src]

type Output = R::Item

type Task = FlatMapTask<P::Task, F>

Loading content...