3 ms·
For that use-case can you get away with just setting #[repr(i32)] on the enum and leaving Unknown out of the list? I guess the compiler can't help you keep kno
by azornathogron 6y ago
For that use-case can you get away with just setting #[repr(i32)] on the enum and leaving Unknown out of the list?
I guess the compiler can't help you keep known and unknown values separate with that structure though, so maybe it's not enough.
- kzrdude 6y agoIf you do that, then 3 etc is not a valid value for the enum. Only valid values for that type are the variants.