pub trait ReadSlice<'de>: Read {
// Required method
fn read_slice<'a>(
&'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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".