[−][src]Struct futures_util::sink::Drain
#[must_use = "futures do nothing unless polled"]pub struct Drain<T> { /* fields omitted */ }
A sink that will discard all items given to it.
See the drain()
function for more details.
Trait Implementations
impl<T: Debug> Debug for Drain<T>
[src]
impl<T: Debug> Debug for Drain<T>
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<T> Sink for Drain<T>
[src]
impl<T> Sink for Drain<T>
type SinkItem = T
The type of value that the sink accepts.
type SinkError = DrainError
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