Skip to main content

WriteBytes

Trait WriteBytes 

Source
pub trait WriteBytes {
    // Required methods
    fn put_u8(&mut self, v: u8);
    fn put_i8(&mut self, v: i8);
    fn put_u16(&mut self, v: u16);
    fn put_i16(&mut self, v: i16);
    fn put_u24(&mut self, v: u32);
    fn put_u32(&mut self, v: u32);
    fn put_i32(&mut self, v: i32);
    fn put_u64(&mut self, v: u64);
    fn put_i64(&mut self, v: i64);
}
Expand description

Appending big-endian values to a byte buffer.

Required Methods§

Source

fn put_u8(&mut self, v: u8)

Appends a u8.

Source

fn put_i8(&mut self, v: i8)

Appends an i8.

Source

fn put_u16(&mut self, v: u16)

Appends a big-endian u16.

Source

fn put_i16(&mut self, v: i16)

Appends a big-endian i16.

Source

fn put_u24(&mut self, v: u32)

Appends a big-endian 24-bit integer.

Source

fn put_u32(&mut self, v: u32)

Appends a big-endian u32.

Source

fn put_i32(&mut self, v: i32)

Appends a big-endian i32.

Source

fn put_u64(&mut self, v: u64)

Appends a big-endian u64.

Source

fn put_i64(&mut self, v: i64)

Appends a big-endian i64.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl WriteBytes for Vec<u8>

Source§

fn put_u8(&mut self, v: u8)

Source§

fn put_i8(&mut self, v: i8)

Source§

fn put_u16(&mut self, v: u16)

Source§

fn put_i16(&mut self, v: i16)

Source§

fn put_u24(&mut self, v: u32)

Source§

fn put_u32(&mut self, v: u32)

Source§

fn put_i32(&mut self, v: i32)

Source§

fn put_u64(&mut self, v: u64)

Source§

fn put_i64(&mut self, v: i64)

Implementors§