Trait ReadFill

Source
pub trait ReadFill: Read {
    // Provided method
    fn read_fill(&mut self, buf: &mut [u8]) -> Result<usize> { ... }
}
Available on crate feature std only.
Expand description

Allows to read into a buffer as much as possible.

Allows the use BufReader with BPX.

Provided Methods§

Source

fn read_fill(&mut self, buf: &mut [u8]) -> Result<usize>

Reads into buf as much as possible.

Returns the number of bytes that could be read.

§Arguments
  • buf: the buffer to read into.

returns: Result<usize, Error>

§Errors

Returns an Error when read has failed.

Implementors§

Source§

impl<T: Read + ?Sized> ReadFill for T