Skip to main content

MigratesTo

Trait MigratesTo 

Source
pub trait MigratesTo<T: Versioned>: Versioned {
    // Required method
    fn migrate(self) -> T;
}
Expand description

Defines explicit migration logic from one version to another.

Implementing this trait establishes a migration path from Self (the source version) to T (the target version).

Required Methods§

Source

fn migrate(self) -> T

Migrates from the current version to the target version.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§