Re: [PATCH v2] rust: impl_flags: add conversions for raw flag representations
From: Alexandre Courbot
Date: Sun Sep 20 2026 - 23:37:13 EST
On Mon Sep 21, 2026 at 4:18 AM JST, Filipe Xavier wrote:
> 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.
This does 3 different things and would be much more comfortable to
review if split into 3 distinct patches.