magic_migrate 2.0.0

Automagically load and migrate deserialized structs to the latest version
Documentation
# use chrono::{DateTime, Utc};
# use serde::{Deserialize, Serialize};
#
# #[derive(Deserialize, Serialize, Debug)]
# #[serde(deny_unknown_fields)]
# struct PersonV1 {
#     name: String,
# }
#
# #[derive(Deserialize, Serialize, Debug)]
# #[serde(deny_unknown_fields)]
# struct PersonV2 {
#     name: String,
#     updated_at: DateTime<Utc>,
# }
#
# // First define how to map from one struct to another
# impl From<PersonV1> for PersonV2 {
#     fn from(value: PersonV1) -> Self {
#         PersonV2 {
#             name: value.name.clone(),
#             updated_at: Utc::now(),
#         }
#     }
# }
#