Function eos_rs::api::io::empty

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

Constructs a new handle to an empty reader.

All reads from the returned reader will return [Ok](0).

Examples

A slightly sad example of not reading anything into a buffer:

use acid_io::Read;

let mut buffer = String::new();
acid_io::empty().read_to_string(&mut buffer).unwrap();
assert!(buffer.is_empty());