You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
It would be nice to support
Option<T>
whereT
is a simple enum type.This isn't supported by either
ssmarshal
orzerocopy
. I think we'd want to implement a specialzerocopy
case like we're doing forbool
already. It turns out that the compiler is smart enough to packNone
into an unused enum slot, which you can find usingso we could use this value for the
None
case.The text was updated successfully, but these errors were encountered: