Struct futures::sink::WithFlatMap [] [src]

#[must_use = "sinks do nothing unless polled"]
pub struct WithFlatMap<S, U, St, F> where
    F: FnMut(U) -> St,
    S: Sink,
    St: Stream<Item = <S as Sink>::SinkItem, Error = <S as Sink>::SinkError>, 
{ /* fields omitted */ }

Sink for the Sink::with_flat_map combinator, chaining a computation that returns an iterator to run prior to pushing a value into the underlying sink

Methods

impl<S, U, St, F> WithFlatMap<S, U, St, F> where
    F: FnMut(U) -> St,
    S: Sink,
    St: Stream<Item = <S as Sink>::SinkItem, Error = <S as Sink>::SinkError>, 
[src]

Important traits for &'a mut I
[src]

Get a shared reference to the inner sink.

Important traits for &'a mut I
[src]

Get a mutable reference to the inner sink.

[src]

Consumes this combinator, returning the underlying sink.

Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.

Trait Implementations

impl<S, U, St, F> Sink for WithFlatMap<S, U, St, F> where
    F: FnMut(U) -> St,
    S: Sink,
    St: Stream<Item = <S as Sink>::SinkItem, Error = <S as Sink>::SinkError>, 
[src]

The type of value that the sink accepts.

The type of value produced by the sink when an error occurs.

[src]

Attempts to prepare the Sink to receive a value. Read more

[src]

Begin the process of sending a value to the sink. Each call to this function must be proceeded by a successful call to poll_ready which returned Ok(Async::Ready(())). Read more

[src]

Flush any remaining output from this sink. Read more

[src]

Flush any remaining output and close this sink, if necessary. Read more

impl<S, U, St, F> Debug for WithFlatMap<S, U, St, F> where
    F: Debug + FnMut(U) -> St,
    S: Sink + Debug,
    St: Debug + Stream<Item = <S as Sink>::SinkItem, Error = <S as Sink>::SinkError>,
    U: Debug,
    <S as Sink>::SinkItem: Debug
[src]

[src]

Formats the value using the given formatter. Read more

impl<S, U, St, F> Stream for WithFlatMap<S, U, St, F> where
    F: FnMut(U) -> St,
    S: Stream + Sink,
    St: Stream<Item = <S as Sink>::SinkItem, Error = <S as Sink>::SinkError>, 
[src]

Values yielded by the stream.

Errors yielded by the stream.

[src]

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more

Auto Trait Implementations

impl<S, U, St, F> Send for WithFlatMap<S, U, St, F> where
    F: Send,
    S: Send,
    St: Send,
    <S as Sink>::SinkItem: Send

impl<S, U, St, F> Sync for WithFlatMap<S, U, St, F> where
    F: Sync,
    S: Sync,
    St: Sync,
    <S as Sink>::SinkItem: Sync