We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#[repr(u8)] #[derive(Serialize, Deserialize)] pub enum Enum { Variant1(...), Variant3(...) = 2 }
Expected result:
Enum::Variant3(...) -> [2, ...]
The text was updated successfully, but these errors were encountered:
Hi there @desm86, as far as I am aware: serde doesn't actually use the discriminant value, even if it is specified like this.
Serde provides an integer that is the zero-indexed item, so in your example Variant1 will always be 0 and Variant3 will always be 1.
Variant1
Variant3
This is not something postcard can address, unless I am mistaken.
Sorry, something went wrong.
Would this PR be relevant? serde-rs/serde#2354
No branches or pull requests
Expected result:
The text was updated successfully, but these errors were encountered: