Open bramp opened 3 years ago
It would be helpful to have a constant on each bitfield struct that indicates its length, for example
#[bitfield] pub struct MyFourBytes { a: B1, b: B3, c: B4, d: B24, }
should have:
MyFourBytes::BITS; // equals 32
So I can easily determine the length of the struct, when reading/creating byte arrays.
It would be helpful to have a constant on each bitfield struct that indicates its length, for example
should have:
So I can easily determine the length of the struct, when reading/creating byte arrays.