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§
Sourcefn write_bytes_le(&self, bytes: &mut [u8])
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.
Sourcefn write_bytes_be(&self, bytes: &mut [u8])
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.