Trait ReadRaw

Source
pub trait ReadRaw {
    // Required methods
    fn read_raw<const MAX_LEN: usize>(&mut self, len: usize) -> Result<Vec<u8>>;
    fn read_raw_array<const LEN: usize>(&mut self) -> Result<[u8; LEN]>;

    // Provided method
    fn read_raw_len<const MAX_LEN: usize>(
        &mut self,
    ) -> Result<usize, DecodeError> { ... }
}

Required Methods§

Source

fn read_raw<const MAX_LEN: usize>(&mut self, len: usize) -> Result<Vec<u8>>

Source

fn read_raw_array<const LEN: usize>(&mut self) -> Result<[u8; LEN]>

Provided Methods§

Source

fn read_raw_len<const MAX_LEN: usize>(&mut self) -> Result<usize, DecodeError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: ReadRaw> ReadRaw for &mut T

Source§

fn read_raw<const MAX_LEN: usize>(&mut self, len: usize) -> Result<Vec<u8>>

Source§

fn read_raw_array<const LEN: usize>(&mut self) -> Result<[u8; LEN]>

Implementors§