pub trait MigrateFrom<Prev: Ix>: Ix + Sized {
// Required method
fn migrate_from(prev: Prev) -> Self;
}Expand description
A type-safe, compile-time migration edge from an older schema version Prev.
Modelled after From: V2: MigrateFrom<V1> declares that a V1 value can
be lifted to V2. The derive macro generates the body field-by-field, so an
impossible transformation becomes a type error, not a runtime panic.
Required Methods§
Sourcefn migrate_from(prev: Prev) -> Self
fn migrate_from(prev: Prev) -> Self
Lift a value of the previous schema version into this one.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".