Struct futures::stream::Buffered[][src]

#[must_use = "streams do nothing unless polled"]
pub struct Buffered<St> where
    St: Stream + Stream,
    <St as Stream>::Item: Future
{ /* fields omitted */ }

An adaptor for a stream of futures to execute the futures concurrently, if possible.

This adaptor will buffer up a list of pending futures, and then return their results in the order that they were pulled out of the original stream. This is created by the Stream::buffered method.

Methods

impl<St> Buffered<St> where
    St: Stream,
    <St as Stream>::Item: Future
[src]

Important traits for &'a mut I

Acquires a reference to the underlying stream that this combinator is pulling from.

Important traits for &'a mut I

Acquires a mutable reference to the underlying stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.

Acquires a mutable pinned reference to the underlying stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.

Consumes this combinator, returning the underlying stream.

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> Sink for Buffered<S> where
    S: Stream + Sink,
    <S as Stream>::Item: Future
[src]

The type of value that the sink accepts.

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

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

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(Poll::Ready(())). Read more

Flush any remaining output from this sink. Read more

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

impl<St> Unpin for Buffered<St> where
    St: Stream + Unpin,
    <St as Stream>::Item: Future
[src]

impl<St> Debug for Buffered<St> where
    St: Stream + Debug,
    <St as Stream>::Item: Future
[src]

Formats the value using the given formatter. Read more

impl<St> Stream for Buffered<St> where
    St: Stream,
    <St as Stream>::Item: Future
[src]

Values yielded by the stream.

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<St> Send for Buffered<St> where
    St: Send,
    <St as Stream>::Item: Send,
    <<St as Stream>::Item as Future>::Output: Send

impl<St> Sync for Buffered<St> where
    St: Sync,
    <St as Stream>::Item: Sync,
    <<St as Stream>::Item as Future>::Output: Sync