[][src]Trait amadeus_core::pipe::Pipe

pub trait Pipe<Source> {
    type Item;
    fn poll_next(
        self: Pin<&mut Self>,
        cx: &mut Context,
        stream: Pin<&mut impl Stream<Item = Source>>
    ) -> Poll<Option<Self::Item>>; fn pipe<P>(self, pipe: P) -> PipePipe<Self, P>
    where
        P: Pipe<Self::Item>,
        Self: Sized
, { ... }
fn sink<S>(self, sink: S) -> PipeSink<Self, S>
    where
        S: Sink<Self::Item>,
        Self: Sized
, { ... }
fn flat_map<F, R>(self, f: F) -> FlatMap<Self, F, R>
    where
        F: FnMut(Self::Item) -> R,
        R: Stream,
        Self: Sized
, { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
    where
        F: FnMut(&Self::Item) -> bool,
        Self: Sized
, { ... } }

Associated Types

type Item

Loading content...

Required methods

fn poll_next(
    self: Pin<&mut Self>,
    cx: &mut Context,
    stream: Pin<&mut impl Stream<Item = Source>>
) -> Poll<Option<Self::Item>>

Loading content...

Provided methods

fn pipe<P>(self, pipe: P) -> PipePipe<Self, P> where
    P: Pipe<Self::Item>,
    Self: Sized

fn sink<S>(self, sink: S) -> PipeSink<Self, S> where
    S: Sink<Self::Item>,
    Self: Sized

fn flat_map<F, R>(self, f: F) -> FlatMap<Self, F, R> where
    F: FnMut(Self::Item) -> R,
    R: Stream,
    Self: Sized

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

Loading content...

Implementations on Foreign Types

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

type Item = A::Item

impl<P, Source> Pipe<Source> for Pin<P> where
    P: DerefMut + Unpin,
    P::Target: Pipe<Source>, 
[src]

type Item = <P::Target as Pipe<Source>>::Item

impl<'_, T: ?Sized, Source> Pipe<Source> for &'_ mut T where
    T: Pipe<Source> + Unpin
[src]

type Item = T::Item

Loading content...

Implementors

impl<'a, C, Source: 'a, T: 'a> Pipe<&'a Source> for ClonedTask<C> where
    C: Pipe<&'a Source, Item = &'a T>,
    T: Clone
[src]

type Item = T

impl<A, B, C, Source, RefAItem> Pipe<Source> for JoinStreamTaskAsync<A, B, C, RefAItem, A::Item> where
    A: Pipe<Source>,
    B: Pipe<A::Item>,
    C: Pipe<RefAItem>, 
[src]

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

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

type Item = B::Item

impl<C: Pipe<Source>, F, R, Source> Pipe<Source> for MapTask<C, F> where
    F: FnMut(C::Item) -> R + Clone
[src]

type Item = R

impl<C: Pipe<Source>, F, R, Source> Pipe<Source> for FlatMap<C, F, R> where
    F: FnMut(C::Item) -> R,
    R: Stream
[src]

type Item = R::Item

impl<C: Pipe<Source>, F, Source> Pipe<Source> for InspectTask<C, F> where
    F: FnMut(&C::Item) + Clone
[src]

type Item = C::Item

impl<C: Pipe<Source>, F, Source> Pipe<Source> for UpdateTask<C, F> where
    F: FnMut(&mut C::Item) + Clone
[src]

type Item = C::Item

impl<C: Pipe<Source>, F, Source> Pipe<Source> for Filter<C, F> where
    F: FnMut(&C::Item) -> bool
[src]

type Item = C::Item

impl<Item> Pipe<Item> for IdentityTask[src]

type Item = Item

impl<Source> Pipe<Source> for AsyncTuple0<Source> where
    Source: , 
[src]

type Item = Sum0

impl<Source, C0: Pipe<Source>> Pipe<Source> for AsyncTuple1<Source, C0> where
    Source: , 
[src]

type Item = Sum1<C0::Item>

impl<Source, C0: Pipe<Source>, C1: Pipe<Source>> Pipe<Source> for AsyncTuple2<Source, C0, C1> where
    Source: Copy
[src]

type Item = Sum2<C0::Item, C1::Item>

impl<Source, C0: Pipe<Source>, C1: Pipe<Source>, C2: Pipe<Source>> Pipe<Source> for AsyncTuple3<Source, C0, C1, C2> where
    Source: Copy
[src]

type Item = Sum3<C0::Item, C1::Item, C2::Item>

impl<Source, C0: Pipe<Source>, C1: Pipe<Source>, C2: Pipe<Source>, C3: Pipe<Source>> Pipe<Source> for AsyncTuple4<Source, C0, C1, C2, C3> where
    Source: Copy
[src]

type Item = Sum4<C0::Item, C1::Item, C2::Item, C3::Item>

impl<Source, C0: Pipe<Source>, C1: Pipe<Source>, C2: Pipe<Source>, C3: Pipe<Source>, C4: Pipe<Source>> Pipe<Source> for AsyncTuple5<Source, C0, C1, C2, C3, C4> where
    Source: Copy
[src]

type Item = Sum5<C0::Item, C1::Item, C2::Item, C3::Item, C4::Item>

impl<Source, C0: Pipe<Source>, C1: Pipe<Source>, C2: Pipe<Source>, C3: Pipe<Source>, C4: Pipe<Source>, C5: Pipe<Source>> Pipe<Source> for AsyncTuple6<Source, C0, C1, C2, C3, C4, C5> where
    Source: Copy
[src]

type Item = Sum6<C0::Item, C1::Item, C2::Item, C3::Item, C4::Item, C5::Item>

impl<Source, C0: Pipe<Source>, C1: Pipe<Source>, C2: Pipe<Source>, C3: Pipe<Source>, C4: Pipe<Source>, C5: Pipe<Source>, C6: Pipe<Source>> Pipe<Source> for AsyncTuple7<Source, C0, C1, C2, C3, C4, C5, C6> where
    Source: Copy
[src]

type Item = Sum7<C0::Item, C1::Item, C2::Item, C3::Item, C4::Item, C5::Item, C6::Item>

impl<Source, C0: Pipe<Source>, C1: Pipe<Source>, C2: Pipe<Source>, C3: Pipe<Source>, C4: Pipe<Source>, C5: Pipe<Source>, C6: Pipe<Source>, C7: Pipe<Source>> Pipe<Source> for AsyncTuple8<Source, C0, C1, C2, C3, C4, C5, C6, C7> where
    Source: Copy
[src]

type Item = Sum8<C0::Item, C1::Item, C2::Item, C3::Item, C4::Item, C5::Item, C6::Item, C7::Item>

Loading content...