Trait WriteRaw

Source
pub trait WriteRaw {
    // Required method
    fn write_raw<const MAX_LEN: usize>(
        &mut self,
        bytes: impl AsRef<[u8]>,
    ) -> Result<()>;

    // Provided methods
    fn write_raw_array<const LEN: usize>(
        &mut self,
        raw: [u8; LEN],
    ) -> Result<()> { ... }
    fn write_raw_len<const MAX_LEN: usize>(&mut self, len: usize) -> Result<()> { ... }
}

Required Methods§

Source

fn write_raw<const MAX_LEN: usize>( &mut self, bytes: impl AsRef<[u8]>, ) -> Result<()>

Provided Methods§

Source

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

Source

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

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: WriteRaw> WriteRaw for &mut T

Source§

fn write_raw<const MAX_LEN: usize>( &mut self, bytes: impl AsRef<[u8]>, ) -> Result<()>

Implementors§