Trait Migrator

Source
pub trait Migrator {
    // Required methods
    fn input_version(&self) -> u32;
    fn output_version(&self) -> u32;
    fn run(self);
}

Required Methods§

Source

fn input_version(&self) -> u32

Input state version this migration expects to read (the underlying StateTransformer::input_version).

Source

fn output_version(&self) -> u32

Output state version this migration writes (the underlying StateTransformer::output_version).

Source

fn run(self)

Apply the migration, advancing the stored state version to Migrator::output_version. Consumes self; run only after the chain is validated.

Implementors§