Trait lazy_reader::Read[][src]

pub trait Read {
    type Item;
    fn read(&mut self, buffer: &mut [Self::Item]) -> usize;
}
Expand description

Trait for reading input data into a buffer.

Compared to std::io::Read this reader supports multiple input encodings.

Associated Types

type Item[src]

Expand description

The type of the data in the buffer.

Loading content...

Required methods

fn read(&mut self, buffer: &mut [Self::Item]) -> usize[src]

Expand description

Fills the buffer and returns amount of elements read.

In case it isn’t possible to fill the whole buffer (i.e. if an error like EOF is encountered), the buffer will be filled with all the data read before encountering such an error.

Loading content...

Implementors

impl<R: Read> Read for R[src]

type Item = u8

fn read(&mut self, buffer: &mut [u8]) -> usize[src]

Loading content...