Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Adding support for bincode Encode/Decode for a struct defined elsewhere
Adding support for bincode Encode/Decode for a struct defined elsewhere
โ Rust ๐ 2025-07-18 ๐ค surdeus ๐๏ธ 2I have a struct that I want to use. I want to be able to Encode/Decode it using bincode. How can I add a custom function to do that?
I know for Serialize/Deserialize I can add an attribute #[serde(with = "my_serde")]
and define a module with the function serialize and deserialize . I found a great source here Custom serialization ยท Serde .
However, for bincode Encode/Decode I can't find what to do.
Specifically ibe/src/kem/kiltz_vahlis_one.rs at main ยท encryption4all/ibe ยท GitHub
Any help?
10 posts - 3 participants
๐ท๏ธ rust_feed