Trait byte_struct::ByteStruct [−][src]
A data structure that can be packed into or unpacked from raw bytes.
This trait can be derived by
#[derive(ByteStruct)].
One can implement this trait for custom types in order to pack or unpack an object in a special way.
Required methods
fn write_bytes(&self, bytes: &mut [u8])[src]
Packs the struct into raw bytes and write to a slice
fn read_bytes(bytes: &[u8]) -> Self[src]
Unpacks raw bytes from a slice into a new struct