Function async_std::io::empty[][src]

pub fn empty() -> Empty

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