Trait embedded_io::blocking::BufRead

source ·
pub trait BufRead: Io {
    // Required methods
    fn fill_buf(&mut self) -> Result<&[u8], Self::Error>;
    fn consume(&mut self, amt: usize);
}
Expand description

Blocking buffered reader.

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

Required Methods§

source

fn fill_buf(&mut self) -> Result<&[u8], Self::Error>

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

source

fn consume(&mut self, amt: usize)

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§

source§

impl BufRead for &[u8]

source§

fn fill_buf(&mut self) -> Result<&[u8], Self::Error>

source§

fn consume(&mut self, amt: usize)

source§

impl<T: ?Sized + BufRead> BufRead for &mut T

source§

fn fill_buf(&mut self) -> Result<&[u8], Self::Error>

source§

fn consume(&mut self, amt: usize)

source§

impl<T: ?Sized + BufRead> BufRead for Box<T>

Available on crate features std or alloc only.
source§

fn fill_buf(&mut self) -> Result<&[u8], Self::Error>

source§

fn consume(&mut self, amt: usize)

Implementors§