Open nicholascioli opened 1 year ago
For now, I wouldn't add this to the codegen/attribute part of the library. But you can easily implement this manually by writing your own logic into a PackedStruct
trait implementation and offloading the work on the inner parts of the variants to the codegen'd packing.
I've used this library for a while and it has been great, but I was wondering if something like packed enum variants would be something that could be potentially in scope for this project.
I have a packed message that, depending on the tag (the first two bytes), has a different layout per message type. Would this library be able to do handle something like the following?
Or is this better handled as a separate library? I don't mind contributing, if this seems within scope.