Function async_std::io::sink[][src]

pub fn sink() -> Sink

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?;