Filipe Xavier <[email protected]> writes: > Extend the impl_flags! macro to support conversions between generated flag > types and raw C/UAPI integers. Implement TryFrom<Repr> for individual flags > (exact variant match) and flag sets (rejecting unknown bits), along with an > unsafe from_raw() constructor for flag sets. Additionally, add BitOr and > BitOrAssign implementations between the raw representation and flag types. > > Suggested-by: Daniel Almeida <[email protected]> > Suggested-by: Andreas Hindborg <[email protected]> > Signed-off-by: Filipe Xavier <[email protected]>
I feel like I already sent a patch for at least part of this [1]. Please go review that one and maybe use it as a dependency. Best regards, Andreas Hindborg [1] https://lore.kernel.org/all/[email protected]/
