pub struct Migrator<B> { /* private fields */ }Implementations§
Source§impl<B: MigrationBackend> Migrator<B>
impl<B: MigrationBackend> Migrator<B>
pub async fn run( &self, migrations: impl IntoIterator<Item = Migration>, ) -> Result<MigrationReport, MigrationRunError<B::Error>>
Source§impl<B: MigrationLedger> Migrator<B>
impl<B: MigrationLedger> Migrator<B>
Sourcepub async fn verify_required(
&self,
migrations: impl IntoIterator<Item = Migration>,
) -> Result<(), MigrationRunError<B::Error>>
pub async fn verify_required( &self, migrations: impl IntoIterator<Item = Migration>, ) -> Result<(), MigrationRunError<B::Error>>
Verify that every supplied migration is present with its exact checksum, without locking or mutating the database.
Additional database migrations are admitted so an older serving process can run during an expand-compatible rolling upgrade. Callers remain responsible for deciding which schema versions are compatible.
Auto Trait Implementations§
impl<B> Freeze for Migrator<B>where
B: Freeze,
impl<B> RefUnwindSafe for Migrator<B>where
B: RefUnwindSafe,
impl<B> Send for Migrator<B>where
B: Send,
impl<B> Sync for Migrator<B>where
B: Sync,
impl<B> Unpin for Migrator<B>where
B: Unpin,
impl<B> UnsafeUnpin for Migrator<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for Migrator<B>where
B: UnwindSafe,
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