That's my bad. I guess I didn't realize how serde
modeled untagged enums with struct variants (like V
in your OP). Just remove the #[serde(transparent)]
and it works (Rust Playground). I edited my post above to fix the error.
That's my bad. I guess I didn't realize how serde
modeled untagged enums with struct variants (like V
in your OP). Just remove the #[serde(transparent)]
and it works (Rust Playground). I edited my post above to fix the error.