Function zng::task::io::empty

pub fn empty() -> Empty
Expand description

Creates an empty reader.

ยงExamples

use futures_lite::io::{self, AsyncReadExt};

let mut reader = io::empty();

let mut contents = Vec::new();
reader.read_to_end(&mut contents).await?;
assert!(contents.is_empty());