pub trait UncheckedOnRuntimeUpgrade {
// Provided methods
fn on_runtime_upgrade() -> Weight { ... }
fn pre_upgrade() -> Result<Vec<u8>, DispatchError> { ... }
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError> { ... }
}
Expand description
This trait is intended for use within VersionedMigration
to execute storage migrations without
automatic version checks. Implementations should ensure migration logic is safe and idempotent.
Provided Methods§
fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Called within VersionedMigration
to execute the actual migration. It is also
expected that no version checks are performed within this function.
See also Hooks::on_runtime_upgrade
.
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
See Hooks::pre_upgrade
.
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
See Hooks::post_upgrade
.
Object Safety§
This trait is not object safe.