pub trait UncheckedOnRuntimeUpgrade {
// Provided methods
fn on_runtime_upgrade() -> Weight { ... }
fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError> { ... }
fn post_upgrade(_state: Vec<u8>) -> Result<(), TryRuntimeError> { ... }
}
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§
sourcefn 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
.
sourcefn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError>
fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError>
See Hooks::pre_upgrade
.
sourcefn post_upgrade(_state: Vec<u8>) -> Result<(), TryRuntimeError>
fn post_upgrade(_state: Vec<u8>) -> Result<(), TryRuntimeError>
See Hooks::post_upgrade
.
Object Safety§
This trait is not object safe.