-
Notifications
You must be signed in to change notification settings - Fork 258
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
[Rust] add enum for fury macro derive #1393
Comments
Hi, could you please clarify if you intend to add an enum to the macro, or if you're suggesting that the macro should be modified to support enums? Additional details would be helpful as the request is a bit ambiguous. Thanks! |
fury/rust/fury-derive/src/object/serializer.rs Lines 25 to 29 in e99b46f
It seems this is where we need to fix, please assign this issue to me. @theweipeng |
This spec says enum are serialized as unsigned var int, but in Rust enum could carry payload, such as: enum Location {
Unknown,
Anonymous,
Known(Coord),
}
enum ComplexEnum {
Nothing,
Something(u32),
LotsOfThings {
usual_struct_stuff: bool,
blah: String,
}
} Those are actually tagged unions, so in first version I will only support enum without any payload, and we may need to discuss how to serialize those union. |
https://serde.rs/enum-representations.html Serde has 4 methods to serialize enum. |
as title
The text was updated successfully, but these errors were encountered: