StateMigration

Trait StateMigration 

Source
pub trait StateMigration<Old, New> {
    // Required method
    fn migrate(old: Old) -> Result<New, PatchError>;
}
Expand description

State migration trait for carrying state across patch versions

Required Methods§

Source

fn migrate(old: Old) -> Result<New, PatchError>

Migrate from old state to new state

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§