Trait nue_io::read_exact::ReadExactExt [] [src]

pub trait ReadExactExt {
    fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>;
    fn read_exact_eof(&mut self, buf: &mut [u8]) -> Result<usize>;
}

Extension trait that provides read_exact for all Read implementations.

Required Methods

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

Reads into the entirety of buf or fails with an error.

The Read equivalent of Write::write_all. Retries upon Interrupted errors.

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

Reads as much as possible into buf until EOF.

Retries upon Interrupted errors.

Implementors