pub struct MigrationRegistry<T> { /* private fields */ }Expand description
Schema migration registry
Implementations§
Source§impl<T> MigrationRegistry<T>
impl<T> MigrationRegistry<T>
Sourcepub fn register(&mut self, migration: Box<dyn SchemaMigration<T>>)
pub fn register(&mut self, migration: Box<dyn SchemaMigration<T>>)
Register a migration
Sourcepub fn find_migration_path(
&self,
from: &SchemaVersion,
to: &SchemaVersion,
) -> Option<Vec<&dyn SchemaMigration<T>>>
pub fn find_migration_path( &self, from: &SchemaVersion, to: &SchemaVersion, ) -> Option<Vec<&dyn SchemaMigration<T>>>
Find migration path from source to target version
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for MigrationRegistry<T>
impl<T> !RefUnwindSafe for MigrationRegistry<T>
impl<T> !Send for MigrationRegistry<T>
impl<T> !Sync for MigrationRegistry<T>
impl<T> Unpin for MigrationRegistry<T>
impl<T> !UnwindSafe for MigrationRegistry<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more