modular-bitfield
modular-bitfield copied to clipboard
Implement `AsRef` and `AsMut` instances for `repr(uN)` bitfields
For repr(uN)
bitfields, it'd be helpful to be able to view a reference to the bitfield as a reference to the representation type without copy.
The opposite is also true - there are occasions when I'd like to operate on a primitive type as though it were a bitfield.
I'm happy to submit a RP if this is considered desirable ^
I can't think of an implementation not requiring unsafe. Stdlib functions i.e. from_ne_byes copy.