Open ollie-etl opened 3 years ago
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.
repr(uN)
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.
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.