hit9 / bitproto

The bit level data interchange format for serializing data structures (long term maintenance).
https://bitproto.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
127 stars 16 forks source link

Does bitproto support `union`? #43

Closed chenlijun99 closed 1 year ago

chenlijun99 commented 1 year ago

Hi. First, thanks for this very cool project! I have one question: does bitproto support union (or something like protobuf's oneof)? It would be useful for protocol frames where the deserialization of the remaining bytes depends on some kind of frame id in the header.

I tried to look into https://bitproto.readthedocs.io/en/latest/language.html, but unfortunately didn't find anything.

hit9 commented 1 year ago

Hello, the union or oneof feature is not supported.

chenlijun99 commented 1 year ago

Hi. Thanks for the confirmation! If there is no plan no support this feature, then I guess this issue can be closed.

hit9 commented 1 year ago

Hmm, No such plan so far.