[−][src]Struct futures_util::sink::Buffer
#[must_use = "sinks do nothing unless polled"]pub struct Buffer<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: Sink> Buffer<Si>
[src]
impl<Si: Sink> Buffer<Si>
ⓘImportant traits for &'a mut Wpub fn get_ref(&self) -> &Si
[src]
pub fn get_ref(&self) -> &Si
Get a shared reference to the inner sink.
Trait Implementations
impl<Si: Debug + Sink> Debug for Buffer<Si> where
Si::SinkItem: Debug,
[src]
impl<Si: Debug + Sink> Debug for Buffer<Si> where
Si::SinkItem: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<Si: Sink + Unpin> Unpin for Buffer<Si>
[src]
impl<Si: Sink + Unpin> Unpin for Buffer<Si>
impl<S> Stream for Buffer<S> where
S: Sink + Stream,
[src]
impl<S> Stream for Buffer<S> where
S: Sink + Stream,
type Item = S::Item
Values yielded by the stream.
fn poll_next(self: PinMut<Self>, cx: &mut Context) -> Poll<Option<S::Item>>
[src]
fn poll_next(self: PinMut<Self>, cx: &mut Context) -> Poll<Option<S::Item>>
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
impl<Si: Sink> Sink for Buffer<Si>
[src]
impl<Si: Sink> Sink for Buffer<Si>
type SinkItem = Si::SinkItem
The type of value that the sink accepts.
type SinkError = Si::SinkError
The type of value produced by the sink when an error occurs.
fn poll_ready(
self: PinMut<Self>,
cx: &mut Context
) -> Poll<Result<(), Self::SinkError>>
[src]
fn poll_ready(
self: PinMut<Self>,
cx: &mut Context
) -> Poll<Result<(), Self::SinkError>>
Attempts to prepare the Sink
to receive a value. Read more
fn start_send(
self: PinMut<Self>,
item: Self::SinkItem
) -> Result<(), Self::SinkError>
[src]
fn start_send(
self: PinMut<Self>,
item: Self::SinkItem
) -> Result<(), Self::SinkError>
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
fn poll_flush(
self: PinMut<Self>,
cx: &mut Context
) -> Poll<Result<(), Self::SinkError>>
[src]
fn poll_flush(
self: PinMut<Self>,
cx: &mut Context
) -> Poll<Result<(), Self::SinkError>>
Flush any remaining output from this sink. Read more
fn poll_close(
self: PinMut<Self>,
cx: &mut Context
) -> Poll<Result<(), Self::SinkError>>
[src]
fn poll_close(
self: PinMut<Self>,
cx: &mut Context
) -> Poll<Result<(), Self::SinkError>>
Flush any remaining output and close this sink, if necessary. Read more