It would be beneficial to differentiate struct uniqueness by multiple fields. A good use case example is message versioning. You might have multiple message types and multiple versions associated with it.
Usage example:
class MessageType1V1(Struct, tag=("type1", "v1"), tag_field=("type", "version")):
foo: int
bar: str
... multiple message type1 versions
class MessageType2V1(Struct, tag=("type2", "v1"), tag_field=("type", "version")):
some_other_foo: int
some_other_bar: str
... multiple message type2 versions
Adding to this it would be good to add an option to preserve tag fields after decoding, so we can differentiate messages based on their attributes (type and version in this case) instead of a type.
Description
It would be beneficial to differentiate struct uniqueness by multiple fields. A good use case example is message versioning. You might have multiple message types and multiple versions associated with it.
Usage example:
Adding to this it would be good to add an option to preserve tag fields after decoding, so we can differentiate messages based on their attributes (
type
andversion
in this case) instead of a type.