Trait compatible_with::CompatibleWith
source · pub trait CompatibleWith<Old> {
// Required method
fn from_old(value: Old) -> Self;
}Expand description
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
ⓘ
#[derive(Serialize, Deserialize)]
pub struct Current;
pub struct SomeType {
my_var: Current,
}The Current version of the struct is CompatibleWith<Old>