-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
functions to enable encoding/decoding serde types #422
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #422 +/- ##
==========================================
- Coverage 71.04% 64.62% -6.42%
==========================================
Files 41 47 +6
Lines 2811 3237 +426
==========================================
+ Hits 1997 2092 +95
- Misses 814 1145 +331
Continue to review full report at Codecov.
|
bd7e14b
to
1e727ff
Compare
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.
I feel like this should have an impl Encode for T where T: Serialize
and same for Decode
. With the current implementation you can't bring a struct that only implements Serialize
into a struct you want to implement Encode
on
I've opened a separate issue for having bincode |
41e04a2
to
e45249f
Compare
This is an initial attempt at supporting serde in bincode 2.
I did have to make separate functions for all serde-related functionality. This is possibly preventable.
Implementing
Serialize
was relatively easy.For
Deserialize
andDeserializeOwned
I ended up making 2 functions, which supportBorrowDecoder
andDecoder
respectfully. These also have 2 separate functions right now, we might be able to merge this into one function.