Function holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dependencies::futures::io::empty
pub fn empty() -> Empty
Expand description
Constructs a new handle to an empty reader.
All reads from the returned reader will return Poll::Ready(Ok(0))
.
Examples
A slightly sad example of not reading anything into a buffer:
use futures::io::{self, AsyncReadExt};
let mut buffer = String::new();
let mut reader = io::empty();
reader.read_to_string(&mut buffer).await?;
assert!(buffer.is_empty());