-
Notifications
You must be signed in to change notification settings - Fork 95
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
Partial Rust Enum Serialization/Deserialization Support #60
Conversation
Hi everyone, I tested this feature and it's work perfectly, thanks @jdeschenes . |
Apologies, we kinda dropped on the ball on this one. Unfortunately the serde integration is the part of the code base I know the least, so it will take me a bit of time to review the code, but I'll look into it when I have a bit of free time to dedicate to this project. The conflicts seem to be only style-related, so those should not be a blocker. |
There is also #76 implementing bits and pieces of the same feature in a slightly different way and they are both pretty old... (definitely because of the fault of us maintainers). I'll need to budget some time to properly understand how serde handles enums (tonight I only managed to read the serialization half of the data format) and at the same time follow up with the authors to understand who is still interested in contributing. @jdeschenes are you still interested in contributing? Shall we try to revitalize this PR? I'll ask the same to @RGafiyatullin on #76 . |
I don't mind taking a look. What do you want to be done? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdeschenes it's great to know that you are still interested! :)
Sorry for the late reply, but I struggled to find the time to learn how to implement a serde deserializer. Anyway, now I finally managed to understand this PR and it seems pretty legit to me.
If you can fix the conflicts (they should just be a couple commas), I will proceed with merging it.
@jdeschenes any problem with the merge conflicts I can help with? |
@jdeschenes @poros I’d love to help get this across the line. What else needs done here? Just fix the conflicts up? |
@calvinbrown085 yes, just fixing the merge conflicts |
I don't think I have permission to push to this fork :( |
I think the way GitHub intend people to do these things is to create
another PR after you checked out this branch. Does it make sense?
…On Sat, Feb 29, 2020, 18:10 Calvin Brown ***@***.***> wrote:
I don't think I have permission to push to this fork :(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60?email_source=notifications&email_token=AALT2BUS5ZOALIFAUDIC7LTRFFHS5A5CNFSM4GNXAT6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENMBOJY#issuecomment-592975655>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALT2BTRXDIIG5F4ID7GJBTRFFHS5ANCNFSM4GNXAT6A>
.
|
Yeah, that does! I'll see if I can give that a whirl. |
Merged as part of #110 |
Hello,
Currently, it is not possible to have enums beyond the unit in this library. This is an attempt to support enums.
Let me know if there are adjustments would you like to be done.
Implementation
There are four types of enums:
Here are the conversions that will be applied:
Unit
Value
Tuples
Structs
Some additional information
respected.
Let me know if there is a need for it.
Limitations
I kept the serialization variants, but they are bogus. The Unit enums still works but they are
serialized as string.
it should be done.
So it is not feasible to create a schema of the "Tuples" and "Structs" example as they are.