-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
It would be nice to support Option<T> where T is a simple enum type.
This isn't supported by either ssmarshal or zerocopy. I think we'd want to implement a special zerocopy case like we're doing for bool already. It turns out that the compiler is smart enough to pack None into an unused enum slot, which you can find using
let a: Option<TofinoSeqError> = None;
let a: u8 = unsafe { std::mem::transmute(a) };so we could use this value for the None case.
Metadata
Metadata
Assignees
Labels
No labels