Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upexample for a custom serialization and deserialization #270
Comments
|
@Hugo-Trentesaux I'm not sure I understand what you are asking. Could you give a code example of what you are trying to accomplish? |
|
For example, I have an |
|
I don't believe there is anything specific to bincode involved in that. You would write a custom Serialize/Deserialize implementation for your type, and if you ran bincode::serialize on it then it would be invoked appropriately. |
|
https://github.com/servo/ipc-channel/blob/master/src/ipc.rs#L802-L822 is not a super clear example, but it does show a custom serialization that is used with the bincode serializer. |
Where could I find an example on how to build a custom serializer / deserializer with bincode for my structure? Or do I have to implement my own functions to replace
bincode::serializeandbincode::deserialize?