You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to use rkvy in a struct which has custom type coming from external library, which provides custom serialize/deserialize, but not sure how to wire them. Here is example Code.
#[derive(Clone,Serialize,Deserialize,PartialEq,Archive)]pubstructStore{pubid:i32,publooker:SomeCustomLooker// coming from external library <- how to use custom functions here??}
As it happens, external library is providing this functions:
The text was updated successfully, but these errors were encountered:
ezkangaroo
changed the title
How to perform custom serialization with custom struct
How to use custom serializer function for types coming from external library
Dec 11, 2023
rkyv has a related but different system for serializing external types called wrapper types. The book documentation is somewhat sparse, so I encourage you to read the example for ArchiveWith. It's basically a way to let you manually write impls for external types as long as you add an attribute.
djkoloski
changed the title
How to use custom serializer function for types coming from external library
Write example for serializing external types using wrapper types
Mar 9, 2024
Hello, I'm trying to use
rkvy
in astruct
which has custom type coming from external library, which provides custom serialize/deserialize, but not sure how to wire them. Here is example Code.As it happens, external library is providing this functions:
In
serde
andbincode
, I can dobut not sure, how to tackle this with
rkvy
.The text was updated successfully, but these errors were encountered: