Skip to main content

Migration

Trait Migration 

Source
pub trait Migration: Send + Sync {
    // Required methods
    fn from_version(&self) -> u32;
    fn to_version(&self) -> u32;
    fn migrate(&self, value: &mut Value) -> Result<(), SettingsError>;
}
Expand description

A single migration step.

Required Methods§

Source

fn from_version(&self) -> u32

Source

fn to_version(&self) -> u32

Source

fn migrate(&self, value: &mut Value) -> Result<(), SettingsError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§