Skip to main content

RuntimeUpgradeHook

Trait RuntimeUpgradeHook 

Source
pub trait RuntimeUpgradeHook {
    // Provided methods
    fn pre_upgrade(&mut self, _meta: &SnapshotMeta) { ... }
    fn migrate_state(&mut self, snapshot: StationSnapshot) -> StationSnapshot { ... }
    fn post_upgrade(&mut self, _meta: &SnapshotMeta) { ... }
}
Expand description

Hook interface for runtime version upgrades around a full barrier.

Provided Methods§

Source

fn pre_upgrade(&mut self, _meta: &SnapshotMeta)

Called before state migration while the runtime is frozen.

Source

fn migrate_state(&mut self, snapshot: StationSnapshot) -> StationSnapshot

Called to migrate a station snapshot while frozen.

Source

fn post_upgrade(&mut self, _meta: &SnapshotMeta)

Called after migration and before resume.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§