Skip to content
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

Figure out bincode Decode/Encode interop with serde #433

Closed
VictorKoenders opened this issue Nov 8, 2021 · 0 comments · Fixed by #434
Closed

Figure out bincode Decode/Encode interop with serde #433

VictorKoenders opened this issue Nov 8, 2021 · 0 comments · Fixed by #434

Comments

@VictorKoenders
Copy link
Contributor

Currently bincode 2 only allows either Decode/Encode, or serde's traits. It would be nice to have a way to use serde types while using Decode/Encode

Some ideas:

  • Add an #[serde_interop] attribute to bincode_derive
  • Add a WithSerde<T> that implements Decode/Encode
  • Disable the default impl for Decode/Encode and replace it with something like:
    • impl Decode for T where T: Deserialize
    • impl Encode for T where T: Serialize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant