futures_util::sinkFunction drain
Source pub fn drain<T>() -> Drain<T>
Available on crate feature sink
only.
Expand description
Create a sink that will just discard all items given to it.
Similar to io::Sink
.
ยงExamples
use futures::sink::{self, SinkExt};
let mut drain = sink::drain();
drain.send(5).await?;