[][src]Trait rmp_serde::decode::ReadSlice

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

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

Used to allow zero-copy reading.

Required methods

fn read_slice<'a>(
    &'a mut self,
    len: usize
) -> Result<Reference<'de, 'a, [u8]>, Error>

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

Loading content...

Implementors

impl<'de, R: Read> ReadSlice<'de> for ReadReader<R>[src]

impl<'de, T: AsRef<[u8]> + ?Sized> ReadSlice<'de> for ReadRefReader<'de, T>[src]

Loading content...