The HashMap used for the variants attribute randomises the ordering of enum variants, which is quite unintuitive and doesn't interact nicely with e.g. serde's untagged enum deserialisation which relies on ordering: https://serde.rs/enum-representations.html#untagged
Using a wrapper around Vec we could impose the ordering provided in the top-level superstruct(variants(..)) attribute
The
HashMap
used for thevariants
attribute randomises the ordering of enum variants, which is quite unintuitive and doesn't interact nicely with e.g. serde'suntagged
enum deserialisation which relies on ordering: https://serde.rs/enum-representations.html#untaggedUsing a wrapper around
Vec
we could impose the ordering provided in the top-levelsuperstruct(variants(..))
attribute