Trait WriteBytes

Source
pub trait WriteBytes {
    // Required methods
    fn write_bytes_le(&self, bytes: &mut [u8]);
    fn write_bytes_be(&self, bytes: &mut [u8]);
}
Expand description

Endian aware write to a byte buffer.

Required Methods§

Source

fn write_bytes_le(&self, bytes: &mut [u8])

Writes the bytes of self into the given buffer, in little endian order.

§Panics

Panics if the size of bytes is too small to fit the value of self.

Source

fn write_bytes_be(&self, bytes: &mut [u8])

Writes the bytes of self into the given buffer, in big endian order.

§Panics

Panics if the size of bytes is too small to fit the value of self.

Implementations on Foreign Types§

Source§

impl WriteBytes for bool

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for f32

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for f64

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for i8

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for i16

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for i32

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for i64

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for i128

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for u8

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for u16

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for u32

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for u64

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Source§

impl WriteBytes for u128

Source§

fn write_bytes_le(&self, bytes: &mut [u8])

Source§

fn write_bytes_be(&self, bytes: &mut [u8])

Implementors§