Skip to main content

Migration

Trait Migration 

Source
pub trait Migration {
    // Required methods
    fn id(&self) -> &MigrationId;
    fn apply(&self, tx: &mut dyn Transaction) -> StorageResult<()>;
}
Expand description

Migration contract.

Required Methods§

Source

fn id(&self) -> &MigrationId

Returns the stable migration identity.

Source

fn apply(&self, tx: &mut dyn Transaction) -> StorageResult<()>

Applies this migration within an explicit transaction boundary.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§