pub struct MigrationContext<'a> { /* private fields */ }Expand description
Context for the migration of a DatabaseItem.
Implementations§
Source§impl MigrationContext<'_>
impl MigrationContext<'_>
Sourcepub fn in_progress<E: Entity>(&mut self) -> DBResult<MigrateMap<E>>
pub fn in_progress<E: Entity>(&mut self) -> DBResult<MigrateMap<E>>
Mark the given entity as in-progress, scheduling the entity with the same name for deletion.
Sourcepub fn migrate_entity<E0: Entity, E1: MigratableEntity<E0>>(
&mut self,
) -> DBResult<MigrateMap<E1>>
pub fn migrate_entity<E0: Entity, E1: MigratableEntity<E0>>( &mut self, ) -> DBResult<MigrateMap<E1>>
Migrate an entity between two forms via MigratableEntity.
Sourcepub fn txn(&mut self) -> &mut Transaction
pub fn txn(&mut self) -> &mut Transaction
Retrieve the Transaction.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MigrationContext<'a>
impl<'a> !Send for MigrationContext<'a>
impl<'a> !Sync for MigrationContext<'a>
impl<'a> !UnwindSafe for MigrationContext<'a>
impl<'a> Freeze for MigrationContext<'a>
impl<'a> Unpin for MigrationContext<'a>
impl<'a> UnsafeUnpin for MigrationContext<'a>
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