pub trait ReadSlice<'de>: Read {
    fn read_slice(
        &'a mut self,
        len: usize
    ) -> Result<Reference<'de, 'a, [u8]>, Error>; }
Expand description

Extends the Read trait by allowing to read slices directly by borrowing bytes.

Used to allow zero-copy reading.

Required Methods

Reads the exact number of bytes from the underlying byte-array.

Implementors