NetworkBytesMut

Trait NetworkBytesMut 

Source
pub trait NetworkBytesMut: NetworkBytes + DerefMut<Target = [u8]> {
    // Provided methods
    fn htons_unchecked(&mut self, offset: usize, value: u16) { ... }
    fn htonl_unchecked(&mut self, offset: usize, value: u32) { ... }
}
Expand description

Offers mutable access to a sequence of bytes which stands for different values packed together using network byte ordering.

Provided Methods§

Source

fn htons_unchecked(&mut self, offset: usize, value: u16)

Writes the given u16 value at the specified offset using network byte ordering.

§Panics

If value cannot be written into self at the given offset (e.g. if offset > self.len() - size_of::<u16>()).

Source

fn htonl_unchecked(&mut self, offset: usize, value: u32)

Writes the given u32 value at the specified offset using network byte ordering.

§Panics

If value cannot be written into self at the given offset (e.g. if offset > self.len() - size_of::<u32>()).

Implementations on Foreign Types§

Source§

impl NetworkBytesMut for &mut [u8]

Implementors§