[][src]Trait genio::bufio::BufRead

pub trait BufRead: Read {
    fn fill_buf(&mut self) -> Result<&[u8], Self::ReadError>;
fn consume(&mut self, amount: usize); }

A BufRead is a type of Reader which has an internal buffer, allowing it to perform extra ways of reading.

Required methods

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

Fills the internal buffer of this object, returning the buffer contents. This function is a lower-level call. It needs to be paired with the consume() method to function properly.

fn consume(&mut self, amount: usize)

Tells this buffer that amount bytes have been consumed from the buffer, so they should no longer be returned in calls to read.

Loading content...

Implementations on Foreign Types

impl<'a, R: BufRead> BufRead for &'a mut R[src]

impl<'a> BufRead for &'a [u8][src]

Loading content...

Implementors

Loading content...