pub trait BufRead: Io {
    type FillBufFuture<'a>: Future<Output = Result<&'a [u8], Self::Error>>
    where
        Self: 'a
; fn fill_buf<'a>(&'a mut self) -> Self::FillBufFuture<'a>; 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 Associated Types

Future returned by fill_buf.

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