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());