pub trait Migrator {
// Required methods
fn input_version(&self) -> u32;
fn output_version(&self) -> u32;
fn run(self);
}Required Methods§
Sourcefn input_version(&self) -> u32
fn input_version(&self) -> u32
Input state version this migration expects to read (the underlying
StateTransformer::input_version).
Sourcefn output_version(&self) -> u32
fn output_version(&self) -> u32
Output state version this migration writes (the underlying
StateTransformer::output_version).
Sourcefn run(self)
fn run(self)
Apply the migration, advancing the stored state version to
Migrator::output_version. Consumes self; run only after the chain is validated.