Closed ghost closed 1 year ago
IIUC serde
's untagged enum representation basically bruteforces through all possible enum variants until one of them succeeds. To make this work with typetag
a list of all types that implement a given trait would need to be collected. I don't know how hard that is. Perhaps @dtolnay has a better understanding on how involved implementing this would be?
I would prefer not to support this in this crate. But it would be reasonable for someone else to make a different crate implementing untagged enums.
In addition to externally, internally, and adjacently tagged enum representations,
serde
also supports untagged representation.It would be nice to have support for untagged representation in
typetag
too.