Function async_std::io::empty

source ·
pub fn empty() -> Empty
Expand description

Creates a reader that contains no data.

Examples

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

let mut buf = Vec::new();
let mut reader = io::empty();
reader.read_to_end(&mut buf).await?;

assert!(buf.is_empty());