Trait amadeus_core::pipe::Sink[][src]

pub trait Sink<Item> {
    type Done;
    fn poll_forward(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        stream: Pin<&mut impl Stream<Item = Item>>
    ) -> Poll<Self::Done>; fn send(&mut self, item: Item) -> Send<'_, Self, Item>

Notable traits for Send<'_, S, Item>

impl<S: ?Sized + Sink<Item> + Unpin, Item> Future for Send<'_, S, Item> type Output = Option<S::Done>;

    where
        Self: Unpin
, { ... }
fn send_all<'a, S: ?Sized>(
        &'a mut self,
        items: &'a mut S
    ) -> SendAll<'a, Self, S>

Notable traits for SendAll<'_, S, St>

impl<S: ?Sized + Sink<Item> + Unpin, St: ?Sized + Stream<Item = Item> + Unpin, Item> Future for SendAll<'_, S, St> type Output = Option<S::Done>;

    where
        S: Stream<Item = Item> + Unpin,
        Self: Unpin
, { ... }
fn done(&mut self) -> Done<'_, Self, Item>

Notable traits for Done<'_, S, Item>

impl<S: ?Sized + Sink<Item> + Unpin, Item> Future for Done<'_, S, Item> type Output = S::Done;

    where
        Self: Unpin
, { ... } }

Associated Types

Required methods

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

Returns Poll::Ready when a) it can’t accept any more elements from stream and b) all accepted elements have been fully processed. By convention, stream yielding None typically triggers (a).

Provided methods

fn send(&mut self, item: Item) -> Send<'_, Self, Item>

Notable traits for Send<'_, S, Item>

impl<S: ?Sized + Sink<Item> + Unpin, Item> Future for Send<'_, S, Item> type Output = Option<S::Done>;
where
    Self: Unpin
[src]

fn send_all<'a, S: ?Sized>(
    &'a mut self,
    items: &'a mut S
) -> SendAll<'a, Self, S>

Notable traits for SendAll<'_, S, St>

impl<S: ?Sized + Sink<Item> + Unpin, St: ?Sized + Stream<Item = Item> + Unpin, Item> Future for SendAll<'_, S, St> type Output = Option<S::Done>;
where
    S: Stream<Item = Item> + Unpin,
    Self: Unpin
[src]

fn done(&mut self) -> Done<'_, Self, Item>

Notable traits for Done<'_, S, Item>

impl<S: ?Sized + Sink<Item> + Unpin, Item> Future for Done<'_, S, Item> type Output = S::Done;
where
    Self: Unpin
[src]

Implementations on Foreign Types

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

type Done = <P::Target as Sink<Item>>::Done

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<T: ?Sized, Item> Sink<Item> for &mut T where
    T: Sink<Item> + Unpin
[src]

type Done = T::Done

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

Implementors

impl Sink<Sum0> for ReduceA0Async[src]

type Done = ()

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum0>>
) -> Poll<Self::Done>
[src]

impl Sink<bool> for BoolAndReducerAsync[src]

type Done = bool

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = bool>>
) -> Poll<Self::Done>
[src]

impl Sink<bool> for BoolOrReducerAsync[src]

type Done = bool

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = bool>>
) -> Poll<Self::Done>
[src]

impl Sink<()> for ReduceC0Async[src]

type Done = ()

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = ()>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, E: Sink<S4>, F: Sink<S5>, G: Sink<S6>, H: Sink<S7>, S0, S1, S2, S3, S4, S5, S6, S7> Sink<Sum8<S0, S1, S2, S3, S4, S5, S6, S7>> for ReduceA8Async<A, B, C, D, E, F, G, H, S0, S1, S2, S3, S4, S5, S6, S7>[src]

type Done = (A::Done, B::Done, C::Done, D::Done, E::Done, F::Done, G::Done, H::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum8<S0, S1, S2, S3, S4, S5, S6, S7>>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, E: Sink<S4>, F: Sink<S5>, G: Sink<S6>, H: Sink<S7>, S0, S1, S2, S3, S4, S5, S6, S7> Sink<(S0, S1, S2, S3, S4, S5, S6, S7)> for ReduceC8Async<A, B, C, D, E, F, G, H, S0, S1, S2, S3, S4, S5, S6, S7>[src]

type Done = (A::Done, B::Done, C::Done, D::Done, E::Done, F::Done, G::Done, H::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (S0, S1, S2, S3, S4, S5, S6, S7)>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, E: Sink<S4>, F: Sink<S5>, G: Sink<S6>, S0, S1, S2, S3, S4, S5, S6> Sink<Sum7<S0, S1, S2, S3, S4, S5, S6>> for ReduceA7Async<A, B, C, D, E, F, G, S0, S1, S2, S3, S4, S5, S6>[src]

type Done = (A::Done, B::Done, C::Done, D::Done, E::Done, F::Done, G::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum7<S0, S1, S2, S3, S4, S5, S6>>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, E: Sink<S4>, F: Sink<S5>, G: Sink<S6>, S0, S1, S2, S3, S4, S5, S6> Sink<(S0, S1, S2, S3, S4, S5, S6)> for ReduceC7Async<A, B, C, D, E, F, G, S0, S1, S2, S3, S4, S5, S6>[src]

type Done = (A::Done, B::Done, C::Done, D::Done, E::Done, F::Done, G::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (S0, S1, S2, S3, S4, S5, S6)>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, E: Sink<S4>, F: Sink<S5>, S0, S1, S2, S3, S4, S5> Sink<Sum6<S0, S1, S2, S3, S4, S5>> for ReduceA6Async<A, B, C, D, E, F, S0, S1, S2, S3, S4, S5>[src]

type Done = (A::Done, B::Done, C::Done, D::Done, E::Done, F::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum6<S0, S1, S2, S3, S4, S5>>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, E: Sink<S4>, F: Sink<S5>, S0, S1, S2, S3, S4, S5> Sink<(S0, S1, S2, S3, S4, S5)> for ReduceC6Async<A, B, C, D, E, F, S0, S1, S2, S3, S4, S5>[src]

type Done = (A::Done, B::Done, C::Done, D::Done, E::Done, F::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (S0, S1, S2, S3, S4, S5)>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, E: Sink<S4>, S0, S1, S2, S3, S4> Sink<Sum5<S0, S1, S2, S3, S4>> for ReduceA5Async<A, B, C, D, E, S0, S1, S2, S3, S4>[src]

type Done = (A::Done, B::Done, C::Done, D::Done, E::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum5<S0, S1, S2, S3, S4>>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, E: Sink<S4>, S0, S1, S2, S3, S4> Sink<(S0, S1, S2, S3, S4)> for ReduceC5Async<A, B, C, D, E, S0, S1, S2, S3, S4>[src]

type Done = (A::Done, B::Done, C::Done, D::Done, E::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (S0, S1, S2, S3, S4)>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, S0, S1, S2, S3> Sink<Sum4<S0, S1, S2, S3>> for ReduceA4Async<A, B, C, D, S0, S1, S2, S3>[src]

type Done = (A::Done, B::Done, C::Done, D::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum4<S0, S1, S2, S3>>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, D: Sink<S3>, S0, S1, S2, S3> Sink<(S0, S1, S2, S3)> for ReduceC4Async<A, B, C, D, S0, S1, S2, S3>[src]

type Done = (A::Done, B::Done, C::Done, D::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (S0, S1, S2, S3)>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, S0, S1, S2> Sink<Sum3<S0, S1, S2>> for ReduceA3Async<A, B, C, S0, S1, S2>[src]

type Done = (A::Done, B::Done, C::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum3<S0, S1, S2>>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, C: Sink<S2>, S0, S1, S2> Sink<(S0, S1, S2)> for ReduceC3Async<A, B, C, S0, S1, S2>[src]

type Done = (A::Done, B::Done, C::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (S0, S1, S2)>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, S0, S1> Sink<Sum2<S0, S1>> for ReduceA2Async<A, B, S0, S1>[src]

type Done = (A::Done, B::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum2<S0, S1>>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, B: Sink<S1>, S0, S1> Sink<(S0, S1)> for ReduceC2Async<A, B, S0, S1>[src]

type Done = (A::Done, B::Done)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (S0, S1)>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, S0> Sink<Sum1<S0>> for ReduceA1Async<A, S0>[src]

type Done = (A::Done,)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Sum1<S0>>>
) -> Poll<Self::Done>
[src]

impl<A: Sink<S0>, S0> Sink<(S0,)> for ReduceC1Async<A, S0>[src]

type Done = (A::Done,)

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (S0,)>>
) -> Poll<Self::Done>
[src]

impl<Item, F> Sink<Item> for AllReducerAsync<Item, F> where
    F: FnMut<(Item,), Output = bool>, 
[src]

type Done = bool

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<Item, F> Sink<Item> for AnyReducerAsync<Item, F> where
    F: FnMut<(Item,), Output = bool>, 
[src]

type Done = bool

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<Item, F> Sink<Item> for FolderSyncReducerAsync<Item, F, F::State, Final> where
    F: FolderSync<Item>, 
[src]

type Done = F::Done

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<Item, F> Sink<Item> for FolderSyncReducerAsync<Item, F, F::State, Inter> where
    F: FolderSync<Item>, 
[src]

type Done = F::State

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<Item, F> Sink<Item> for ForEachReducer<Item, F> where
    F: FnMut<(Item,), Output = ()>, 
[src]

type Done = ()

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<Item, T: Extend<Item>> Sink<Item> for PushReducerAsync<Item, T>[src]

type Done = T

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<Item: IntoIterator<Item = B>, T: Extend<B>, B> Sink<Item> for ExtendReducerAsync<Item, T>[src]

type Done = T

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<P, R, T, U> Sink<(T, U)> for GroupByReducerAAsync<P, R, T, U> where
    P: Pipe<U>,
    R: Reducer<P::Output> + Clone,
    T: Eq + Hash
[src]

type Done = IndexMap<T, R::Done>

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = (T, U)>>
) -> Poll<Self::Done>
[src]

impl<P, S, Item> Sink<Item> for PipeSink<P, S> where
    P: Pipe<Item>,
    S: Sink<P::Output>, 
[src]

type Done = S::Done

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]

impl<R, T, U> Sink<IndexMap<T, U, RandomState>> for GroupByReducerBAsync<R, T, U> where
    R: Reducer<U> + Clone,
    T: Eq + Hash
[src]

type Done = IndexMap<T, R::Done>

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = IndexMap<T, U>>>
) -> Poll<Self::Done>
[src]

impl<R: Sink<Item>, E, Item> Sink<Result<Item, E>> for ResultReducerAsync<R, E>[src]

type Done = Result<R::Done, E>

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Result<Item, E>>>
) -> Poll<Self::Done>
[src]

impl<R: Sink<Item>, Item> Sink<Option<Item>> for OptionReducerAsync<R>[src]

type Done = Option<R::Done>

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Option<Item>>>
) -> Poll<Self::Done>
[src]

impl<R: Sink<Item>, T, Item> Sink<Item> for IntoReducerAsync<R, T> where
    R::Done: Into<T>, 
[src]

type Done = T

fn poll_forward(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>,
    stream: Pin<&mut impl Stream<Item = Item>>
) -> Poll<Self::Done>
[src]