pub trait Migration {
// Required methods
fn id(&self) -> &MigrationId;
fn apply(&self, tx: &mut dyn Transaction) -> StorageResult<()>;
}Expand description
Migration contract.
Required Methods§
Sourcefn id(&self) -> &MigrationId
fn id(&self) -> &MigrationId
Returns the stable migration identity.
Sourcefn apply(&self, tx: &mut dyn Transaction) -> StorageResult<()>
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".