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

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>

Important 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>

Important 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>

Important 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

type Done

Loading content...

Required methods

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

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).

Loading content...

Provided methods

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

Important 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>

Important 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>

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

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

Loading content...

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

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

type Done = T::Done

Loading content...

Implementors

impl Sink<Sum0> for ReduceA0Async[src]

type Done = ()

impl Sink<bool> for BoolAndReducerAsync[src]

type Done = bool

impl Sink<bool> for BoolOrReducerAsync[src]

type Done = bool

impl Sink<()> for ReduceC0Async[src]

type Done = ()

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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

type Done = (A::Done,)

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

type Done = (A::Done,)

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

type Done = bool

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

type Done = bool

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

type Done = F::Done

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

type Done = ()

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

type Done = T

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

type Done = T

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>

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

type Done = S::Done

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>

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

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

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

type Done = Option<R::Done>

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

type Done = T

Loading content...