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

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

    fn inspect<F>(self, f: F) -> Inspect<Self, F>
    where
        F: FnMut(&Self::Item) + Clone + Send + 'static,
        Self: Sized
, { ... }
fn update<F>(self, f: F) -> Update<Self, F>
    where
        F: FnMut(&mut Self::Item) + Clone + Send + 'static,
        Self: Sized
, { ... }
fn map<B, F>(self, f: F) -> Map<Self, F>
    where
        F: FnMut(Self::Item) -> B + Clone + Send + 'static,
        Self: Sized
, { ... }
fn flat_map<B, F>(self, f: F) -> FlatMap<Self, F>
    where
        F: FnMut(Self::Item) -> B + Clone + Send + 'static,
        B: Stream,
        Self: Sized
, { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
    where
        F: FnMut(&Self::Item) -> bool + Clone + Send + 'static,
        Self: Sized
, { ... }
fn cloned<'a, T>(self) -> Cloned<Self, T, Source>
    where
        T: Clone + 'a,
        Source: 'a,
        Self: ParallelPipe<&'a Source, Item = &'a T> + Sized
, { ... }
fn pipe<S>(self, sink: S) -> Pipe<Self, S>
    where
        S: ParallelSink<Self::Item>,
        Self: Sized
, { ... }
fn fork<A, B, RefAItem>(
        self,
        sink: A,
        sink_ref: B
    ) -> Fork<Self, A, B, &'static Self::Item>
    where
        A: ParallelSink<Self::Item>,
        B: for<'a> ParallelSink<&'a Self::Item>,
        Self: Sized
, { ... }
fn for_each<F>(self, f: F) -> ForEach<Self, F>
    where
        F: FnMut(Self::Item) + 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::Item, 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::Output: Send + 'static,
        Self: ParallelPipe<Source, Item = (A, B)> + Sized
, { ... }
fn histogram(self) -> Histogram<Self>
    where
        Self::Item: Hash + Ord + Send + 'static,
        Self: Sized
, { ... }
fn count(self) -> Count<Self>
    where
        Self: Sized
, { ... }
fn sum<B>(self) -> Sum<Self, B>
    where
        B: Sum<Self::Item> + Sum<B> + Send + 'static,
        Self: Sized
, { ... }
fn combine<F>(self, f: F) -> Combine<Self, F>
    where
        F: FnMut(Self::Item, Self::Item) -> Self::Item + Clone + Send + 'static,
        Self::Item: Send + 'static,
        Self: Sized
, { ... }
fn max(self) -> Max<Self>
    where
        Self::Item: Ord + Send + 'static,
        Self: Sized
, { ... }
fn max_by<F>(self, f: F) -> MaxBy<Self, F>
    where
        F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + Send + 'static,
        Self::Item: Send + 'static,
        Self: Sized
, { ... }
fn max_by_key<F, B>(self, f: F) -> MaxByKey<Self, F>
    where
        F: FnMut(&Self::Item) -> B + Clone + Send + 'static,
        B: Ord + 'static,
        Self::Item: Send + 'static,
        Self: Sized
, { ... }
fn min(self) -> Min<Self>
    where
        Self::Item: Ord + Send + 'static,
        Self: Sized
, { ... }
fn min_by<F>(self, f: F) -> MinBy<Self, F>
    where
        F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + Send + 'static,
        Self::Item: Send + 'static,
        Self: Sized
, { ... }
fn min_by_key<F, B>(self, f: F) -> MinByKey<Self, F>
    where
        F: FnMut(&Self::Item) -> B + Clone + Send + 'static,
        B: Ord + 'static,
        Self::Item: Send + 'static,
        Self: Sized
, { ... }
fn most_frequent(
        self,
        n: usize,
        probability: f64,
        tolerance: f64
    ) -> MostFrequent<Self>
    where
        Self::Item: 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<Source, Item = (A, B)> + Sized,
        A: Hash + Eq + Clone + Send + 'static,
        B: Hash + 'static
, { ... }
fn sample_unstable(self, samples: usize) -> SampleUnstable<Self>
    where
        Self::Item: Send + 'static,
        Self: Sized
, { ... }
fn all<F>(self, f: F) -> All<Self, F>
    where
        F: FnMut(Self::Item) -> bool + Clone + Send + 'static,
        Self: Sized
, { ... }
fn any<F>(self, f: F) -> Any<Self, F>
    where
        F: FnMut(Self::Item) -> bool + Clone + Send + 'static,
        Self: Sized
, { ... }
fn collect<B>(self) -> Collect<Self, B>
    where
        B: FromParallelStream<Self::Item>,
        Self: Sized
, { ... } }

Associated Types

type Item

type Task: PipeTask<Source, Item = Self::Item> + 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::Item) + Clone + Send + 'static,
    Self: Sized

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

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

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

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

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

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

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

fn for_each<F>(self, f: F) -> ForEach<Self, F> where
    F: FnMut(Self::Item) + 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::Item, 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::Output: Send + 'static,
    Self: ParallelPipe<Source, Item = (A, B)> + Sized

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

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

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

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

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

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

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

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

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

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

fn most_frequent(
    self,
    n: usize,
    probability: f64,
    tolerance: f64
) -> MostFrequent<Self> where
    Self::Item: 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<Source, Item = (A, B)> + Sized,
    A: Hash + Eq + Clone + Send + 'static,
    B: Hash + 'static, 

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

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

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

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

Loading content...

Implementations on Foreign Types

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

type Item = Sum0

type Task = ()

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

type Item = Sum1<I0::Item>

type Task = (I0::Task,)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl<A: ParallelPipe<Source>, B: ParallelPipe<Source, Item = A::Item>, Source> ParallelPipe<Source> for Sum2<A, B>[src]

type Item = A::Item

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

Loading content...

Implementors

impl<'a, I, Source, T: 'a> ParallelPipe<&'a Source> for Cloned<I, T, Source> where
    I: ParallelPipe<&'a Source, Item = &'a T>,
    T: Clone
[src]

type Item = T

type Task = ClonedTask<I::Task>

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

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

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

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

type Item = B::Item

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

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

type Item = R

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

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

type Item = R::Item

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

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

type Item = I::Item

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

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

type Item = I::Item

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

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

type Item = I::Item

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

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

type Item = Item

type Task = IdentityTask

Loading content...