pub trait BufRead: Io {
    async fn fill_buf(&mut self) -> Result<&[u8], Self::Error>;
    fn consume(&mut self, amt: usize);
}
Available on crate feature async only.
Expand description

Async buffered reader.

Semantics are the same as std::io::BufRead, check its documentation for details.

Required Methods§

Return the contents of the internal buffer, filling it with more data from the inner reader if it is empty.

Tell this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to fill_buf.

Implementations on Foreign Types§

Implementors§