Struct futures::sink::Buffer[][src]

#[must_use = "sinks do nothing unless polled"]
pub struct Buffer<Si> where
    Si: Sink
{ /* fields omitted */ }

Sink for the Sink::buffer combinator, which buffers up to some fixed number of values when the underlying sink is unable to accept them.

Methods

impl<Si> Buffer<Si> where
    Si: Sink
[src]

Important traits for &'a mut I

Get a shared reference to the inner sink.

Trait Implementations

impl<Si> Sink for Buffer<Si> where
    Si: Sink
[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<Si> Unpin for Buffer<Si> where
    Si: Unpin + Sink
[src]

impl<Si> Debug for Buffer<Si> where
    Si: Debug + Sink,
    <Si as Sink>::SinkItem: Debug
[src]

Formats the value using the given formatter. Read more

impl<S> Stream for Buffer<S> where
    S: Sink + Stream
[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<Si> Send for Buffer<Si> where
    Si: Send,
    <Si as Sink>::SinkItem: Send

impl<Si> Sync for Buffer<Si> where
    Si: Sync,
    <Si as Sink>::SinkItem: Sync