- Defines a bitenum:
#[bitenum(<base-data-type>, exhaustive: true)]
is a data type like
u8which is used the actually store the value of the bitfield.
exhaustivespecifies whether the bitenum includes all possible value of the given base data type (for example, a bitenum over u2 with 4 values is exhaustive)
- Defines a bitfield: #[bitfield(
, default: 0)] is a data type like u32 which is used to represent all the bits of the bitfield. default is an optional default when the bitfield is created