-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Currently, DdsType ignores the #[repr(...)] attribute and determines the discriminant by simply counting the number of variants, rounding to the nearest representation. While this usually works, it fails in cases where a specific representation is explicitly defined.
For example, if we declare #[repr(u16)], DdsType will still generate a discriminator of type u8:
#[derive(DdsType)]
#[repr(u16)]
pub enum MyEnum {
Value0 = 0,
Value1,
Value2,This behavior is also reflected in the IDL generator, where we specify @bit_bound (no yet implemented).
Metadata
Metadata
Assignees
Labels
No labels