Function empty
fn empty() -> Empty
Creates a value that is always at EOF for reads, and ignores all data written.
All writes on the returned instance will return Poll::Ready(Ok(buf.len()))
and the contents of the buffer will not be inspected.
All reads from the returned instance will return Poll::Ready(Ok(0)).
This is an asynchronous version of std::io::empty.
Examples
A slightly sad example of not reading anything into a buffer:
use ;
async
A convoluted way of getting the length of a buffer:
use ;
async