Trait layered_io::ReadLayered[][src]

pub trait ReadLayered: Read + Bufferable {
    fn read_with_status(&mut self, buf: &mut [u8]) -> Result<(usize, Status)>;

    fn read_vectored_with_status(
        &mut self,
        bufs: &mut [IoSliceMut<'_>]
    ) -> Result<(usize, Status)> { ... }
fn read_exact_using_status(&mut self, buf: &mut [u8]) -> Result<Status> { ... }
fn minimum_buffer_size(&self) -> usize { ... } }
Expand description

An extension of Read, with read_with_status and read_vectored_with_status which return status information and zero is not special-cased. It also allows streams to specify a minimum_buffer_size.

Required methods

Like Read::read, but also returns a Status.

Provided methods

Like Read::read_vectored, but also returns a Status.

Like Read::read_exact, but uses read_with_status to avoid performing an extra read at the end.

Some streams require a buffer of at least a certain size.

Implementations on Foreign Types