Trait embedded_io::asynch::BufRead
source · [−]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
Required Methods
sourcefn fill_buf<'a>(&'a mut self) -> Self::FillBufFuture<'a>
fn fill_buf<'a>(&'a mut self) -> Self::FillBufFuture<'a>
Return the contents of the internal buffer, filling it with more data from the inner reader if it is empty.