Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjacently and internally tagged enums for non-self-describing formats #1762

Open
da-x opened this issue Mar 26, 2020 · 2 comments
Open

Adjacently and internally tagged enums for non-self-describing formats #1762

da-x opened this issue Mar 26, 2020 · 2 comments

Comments

@da-x
Copy link

da-x commented Mar 26, 2020

It seems that supporting adjacently and internally tagged enums can only work for self-describing formats (see bincode-org/bincode#272). For some non-self-describing formats, it would be nice to support adjacently tagged structs by treating the tag and content values as a tuple instead of additionally serializing the tag string and the content string (i.e. elision of the tag and content strings from serialization and deserialization).

@Kobzol
Copy link

Kobzol commented Jun 20, 2021

It seems that this is also a problem for msgpack-rust (3Hren/msgpack-rust#250), which serializes adjacently tagged enums as tuples.

@dtolnay
Copy link
Member

dtolnay commented Jul 9, 2023

I opened #2496 to make progress on one piece of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants