pub trait Bitfields<const SIZE: usize> {
const BIT_SIZE: usize;
const BYTE_SIZE: usize = SIZE;
fn into_bytes(self) -> [u8; SIZE];
fn from_bytes(input_byte_buffer: [u8; SIZE]) -> Self;
}
Required Associated Constants
Provided Associated Constants
Required Methods
fn into_bytes(self) -> [u8; SIZE]
fn into_bytes(self) -> [u8; SIZE]
Inserts the values of the Bitfields in this structure into a fixed size array, consuming the structure.
Returns a fixed sized byte array containing the Bitfields of the provided structure.
fn from_bytes(input_byte_buffer: [u8; SIZE]) -> Self
fn from_bytes(input_byte_buffer: [u8; SIZE]) -> Self
Extracts the values of the Bitfields in this structure from a fixed size array while consuming it.
Returns Self with the fields containing the extracted values from provided fixed size array of bytes.