logo

Function async_std::io::sink

source · []
pub fn sink() -> Sink
Expand description

Creates a writer that consumes and drops all data.

Examples

use async_std::io;
use async_std::prelude::*;

let mut writer = io::sink();
writer.write(b"hello world").await?;