Crate compatible_with
source ·Expand description
Compatible
Compatibility Layer for older data using serde
You just need to provide a Current: From<Old> implementation
And the rest is handled automatically
Keep in mind that this uses untagged enums so it comes with performance cost
Structs
Enums
Traits
- The
OldisCompatibleTo<Current>version of the struct - This is the main type you will be using
It wraps your old and current type and provides a way to deserialize existing data that might
match either of the types
It will deserialize the old type into an deserialize impl for the old type and then convert it
to the new type