You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working around this not being implemented yet by converting a uN to its underlying storage representation (u8, u32, etc.), using the trait implementation from bit_field here: BitField, and then repacking the uN.
The linked crate/trait was the most-readable-to-code-using-it API design I had found to date for integrating bitflags-like things into existing numeric types. I don't love its panic behaviour, but otherwise, I'd use it if it integrated with types provided by arbitrary-int.
and then consts for these three fields (like in bitflags, so you can | them together). We could use BitField too, but I'm trying to avoid user code which looks like set_bit(1), since it won't tell you anything at first glance.
I'm open to bikeshedding and also to just being proven wrong.
Not entirely sure what a good design might look like here.
The text was updated successfully, but these errors were encountered: