[][src]Trait amadeus::par_pipe::ParallelPipe

#[must_use]pub trait ParallelPipe<Source> where
    <Self::Task as PipeTask<Source>>::Item == Self::Item
{ type Item; type Task: PipeTask<Source> + Send; fn task(&self) -> Self::Task; fn inspect<F>(self, f: F) -> Inspect<Self, F>
    where
        F: FnMut(&Self::Item) + Clone + Send + 'static
, { ... }
fn update<F>(self, f: F) -> Update<Self, F>
    where
        F: FnMut(&mut Self::Item) + Clone + Send + 'static
, { ... }
fn map<B, F>(self, f: F) -> Map<Self, F>
    where
        F: FnMut(Self::Item) -> B + Clone + Send + 'static
, { ... }
fn flat_map<B, F>(self, f: F) -> FlatMap<Self, F>
    where
        B: Stream,
        F: FnMut(Self::Item) -> B + Clone + Send + 'static
, { ... }
fn filter<F, Fut>(self, f: F) -> Filter<Self, F>
    where
        F: FnMut(&Self::Item) -> Fut + Clone + Send + 'static,
        Fut: Future<Output = bool>
, { ... }
fn cloned<'a, T>(self) -> Cloned<Self, T, Source>
    where
        Self: ParallelPipe<&'a Source, Item = &'a T>,
        Source: 'a,
        T: Clone + 'a
, { ... }
fn pipe<S>(self, sink: S) -> Pipe<Self, S>
    where
        S: ParallelSink<Self::Item>
, { ... }
fn for_each<F>(self, f: F) -> ForEach<Self, F>
    where
        F: FnMut(Self::Item) + Clone + Send + 'static
, { ... }
fn fold<ID, F, B>(self, identity: ID, op: F) -> Fold<Self, ID, F, B>
    where
        B: Send + 'static,
        F: FnMut(B, Either<Self::Item, B>) -> B + Clone + Send + 'static,
        ID: FnMut() -> B + Clone + Send + 'static
, { ... }
fn group_by<A, B, ID, F, C>(
        self,
        identity: ID,
        op: F
    ) -> GroupBy<Self, ID, F, C>
    where
        A: Eq + Hash + Send + 'static,
        C: Send + 'static,
        F: FnMut(C, Either<B, C>) -> C + Clone + Send + 'static,
        ID: FnMut() -> C + Clone + Send + 'static,
        Self: ParallelPipe<Source, Item = (A, B)>
, { ... }
fn histogram(self) -> Histogram<Self>
    where
        Self::Item: Hash,
        Self::Item: Ord,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn count(self) -> Count<Self> { ... }
fn sum<B>(self) -> Sum<Self, B>
    where
        B: Sum<Self::Item> + Sum<B> + Send + 'static
, { ... }
fn combine<F>(self, f: F) -> Combine<Self, F>
    where
        F: FnMut(Self::Item, Self::Item) -> Self::Item + Clone + Send + 'static,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn max(self) -> Max<Self>
    where
        Self::Item: Ord,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn max_by<F>(self, f: F) -> MaxBy<Self, F>
    where
        F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + Send + 'static,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn max_by_key<F, B>(self, f: F) -> MaxByKey<Self, F>
    where
        B: Ord + 'static,
        F: FnMut(&Self::Item) -> B + Clone + Send + 'static,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn min(self) -> Min<Self>
    where
        Self::Item: Ord,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn min_by<F>(self, f: F) -> MinBy<Self, F>
    where
        F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + Send + 'static,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn min_by_key<F, B>(self, f: F) -> MinByKey<Self, F>
    where
        B: Ord + 'static,
        F: FnMut(&Self::Item) -> B + Clone + Send + 'static,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn most_frequent(
        self,
        n: usize,
        probability: f64,
        tolerance: f64
    ) -> MostFrequent<Self>
    where
        Self::Item: Hash,
        Self::Item: Eq,
        Self::Item: Clone,
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn most_distinct<A, B>(
        self,
        n: usize,
        probability: f64,
        tolerance: f64,
        error_rate: f64
    ) -> MostDistinct<Self>
    where
        A: Hash + Eq + Clone + Send + 'static,
        B: Hash + 'static,
        Self: ParallelPipe<Source, Item = (A, B)>
, { ... }
fn sample_unstable(self, samples: usize) -> SampleUnstable<Self>
    where
        Self::Item: Send,
        Self::Item: 'static
, { ... }
fn all<F>(self, f: F) -> All<Self, F>
    where
        F: FnMut(Self::Item) -> bool + Clone + Send + 'static
, { ... }
fn any<F>(self, f: F) -> Any<Self, F>
    where
        F: FnMut(Self::Item) -> bool + Clone + Send + 'static
, { ... }
fn collect<B>(self) -> Collect<Self, B>
    where
        B: FromParallelStream<Self::Item>
, { ... } }

Associated Types

type Item

type Task: PipeTask<Source> + 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, 

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

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

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

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

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

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

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

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

fn group_by<A, B, ID, F, C>(
    self,
    identity: ID,
    op: F
) -> GroupBy<Self, ID, F, C> where
    A: Eq + Hash + Send + 'static,
    C: Send + 'static,
    F: FnMut(C, Either<B, C>) -> C + Clone + Send + 'static,
    ID: FnMut() -> C + Clone + Send + 'static,
    Self: ParallelPipe<Source, Item = (A, B)>, 

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

fn count(self) -> Count<Self>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading content...

Implementations on Foreign Types

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

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

type Task = (<I0 as ParallelPipe<Source>>::Task, <I1 as ParallelPipe<Source>>::Task, <I2 as ParallelPipe<Source>>::Task, <I3 as ParallelPipe<Source>>::Task, <I4 as ParallelPipe<Source>>::Task, <I5 as ParallelPipe<Source>>::Task, <I6 as ParallelPipe<Source>>::Task)

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

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

type Task = (<I0 as ParallelPipe<Source>>::Task, <I1 as ParallelPipe<Source>>::Task, <I2 as ParallelPipe<Source>>::Task, <I3 as ParallelPipe<Source>>::Task, <I4 as ParallelPipe<Source>>::Task, <I5 as ParallelPipe<Source>>::Task)

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

type Item = Sum2<<I0 as ParallelPipe<Source>>::Item, <I1 as ParallelPipe<Source>>::Item>

type Task = (<I0 as ParallelPipe<Source>>::Task, <I1 as ParallelPipe<Source>>::Task)

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

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

type Task = (<I0 as ParallelPipe<Source>>::Task, <I1 as ParallelPipe<Source>>::Task, <I2 as ParallelPipe<Source>>::Task, <I3 as ParallelPipe<Source>>::Task, <I4 as ParallelPipe<Source>>::Task, <I5 as ParallelPipe<Source>>::Task, <I6 as ParallelPipe<Source>>::Task, <I7 as ParallelPipe<Source>>::Task)

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

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

type Task = (<I0 as ParallelPipe<Source>>::Task, <I1 as ParallelPipe<Source>>::Task, <I2 as ParallelPipe<Source>>::Task, <I3 as ParallelPipe<Source>>::Task, <I4 as ParallelPipe<Source>>::Task)

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

type Item = Sum1<<I0 as ParallelPipe<Source>>::Item>

type Task = (<I0 as ParallelPipe<Source>>::Task,)

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

type Item = Sum3<<I0 as ParallelPipe<Source>>::Item, <I1 as ParallelPipe<Source>>::Item, <I2 as ParallelPipe<Source>>::Item>

type Task = (<I0 as ParallelPipe<Source>>::Task, <I1 as ParallelPipe<Source>>::Task, <I2 as ParallelPipe<Source>>::Task)

impl<Source> ParallelPipe<Source> for ()[src]

type Item = Sum0

type Task = ()

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

type Item = <A as ParallelPipe<Source>>::Item

type Task = Sum2<<A as ParallelPipe<Source>>::Task, <B as ParallelPipe<Source>>::Task>

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

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

type Task = (<I0 as ParallelPipe<Source>>::Task, <I1 as ParallelPipe<Source>>::Task, <I2 as ParallelPipe<Source>>::Task, <I3 as ParallelPipe<Source>>::Task)

Loading content...

Implementors

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

type Item = T

type Task = ClonedTask<<I as ParallelPipe<&'a Source>>::Task>

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

type Item = <B as ParallelPipe<<A as ParallelPipe<Source>>::Item>>::Item

type Task = JoinTask<<A as ParallelPipe<Source>>::Task, <B as ParallelPipe<<A as ParallelPipe<Source>>::Item>>::Task>

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

type Item = <I as ParallelPipe<Source>>::Item

type Task = FilterTask<<I as ParallelPipe<Source>>::Task, F>

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

type Item = <R as Stream>::Item

type Task = FlatMapTask<<I as ParallelPipe<Source>>::Task, F>

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

type Item = R

type Task = MapTask<<I as ParallelPipe<Source>>::Task, F>

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

type Item = <I as ParallelPipe<Source>>::Item

type Task = InspectTask<<I as ParallelPipe<Source>>::Task, F>

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

type Item = <I as ParallelPipe<Source>>::Item

type Task = UpdateTask<<I as ParallelPipe<Source>>::Task, F>

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

type Item = Item

type Task = IdentityTask

Loading content...