#[bitsize]Expand description
Defines the bitsize of a struct or an enum.
e.g. #[bitsize(4)] represents the item as a u4, which is UInt<u8, 4> underneath.
The size of structs is currently limited to 128 bits.
The size of enums is limited to 64 bits.
Please open an issue if you have a usecase for bigger bitfields.
After the size, structs may take extra options:
hide_value: place the generated struct in a private module so the rawvaluefield cannot be read or written. To write the whole value, useFrom/TryFrominstead, which is more type-safe. Relative visibility (pub(super),pub(self), inherited) is shifted onesuperso it works like you wrote it.new = <vis>: visibility ofnew(private by default, like other Rust items). Examples:new = pub,new = pub(crate).
ⓘ
#[bitsize(8, hide_value, new = pub(crate))]
struct Register { ... }