pub struct FnMigration<Ctx, F, R>where
F: Fn(&mut Ctx) -> Result<(), Error> + Send + Sync,
R: Fn(&mut Ctx) -> Result<(), Error> + Send + Sync,{ /* private fields */ }Expand description
Builder for creating simple migrations with closures
Implementations§
Source§impl<Ctx, F, R> FnMigration<Ctx, F, R>
impl<Ctx, F, R> FnMigration<Ctx, F, R>
Sourcepub fn phase(self, phase: Phase) -> FnMigration<Ctx, F, R>
pub fn phase(self, phase: Phase) -> FnMigration<Ctx, F, R>
Set the deployment phase
pub fn with_rollback<R2>(self, rollback_fn: R2) -> FnMigration<Ctx, F, R2>
Trait Implementations§
Source§impl<Ctx, F, R> Migration<Ctx> for FnMigration<Ctx, F, R>
impl<Ctx, F, R> Migration<Ctx> for FnMigration<Ctx, F, R>
Source§fn can_rollback(&self) -> bool
fn can_rollback(&self) -> bool
Whether this migration supports rollback
Auto Trait Implementations§
impl<Ctx, F, R> Freeze for FnMigration<Ctx, F, R>
impl<Ctx, F, R> RefUnwindSafe for FnMigration<Ctx, F, R>where
F: RefUnwindSafe,
R: RefUnwindSafe,
impl<Ctx, F, R> Send for FnMigration<Ctx, F, R>
impl<Ctx, F, R> Sync for FnMigration<Ctx, F, R>
impl<Ctx, F, R> Unpin for FnMigration<Ctx, F, R>
impl<Ctx, F, R> UnwindSafe for FnMigration<Ctx, F, R>where
F: UnwindSafe,
R: 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