pub struct MigratedOptional<T: Migrateable> { /* private fields */ }Expand description
Proof that a table is at least partially migrated.
This type can be turned into Migrated by providing an error handler.
Implementations§
Source§impl<T: Migrateable> MigratedOptional<T>
impl<T: Migrateable> MigratedOptional<T>
Sourcepub fn map_fk_err<'t>(
self,
f: impl 't + FnOnce() -> Infallible,
) -> Migrated<'t, T>
pub fn map_fk_err<'t>( self, f: impl 't + FnOnce() -> Infallible, ) -> Migrated<'t, T>
The closure is called when there is a foreign key error due to some row being removed.
Source§impl<T: Migrateable<Referer = Infallible>> MigratedOptional<T>
impl<T: Migrateable<Referer = Infallible>> MigratedOptional<T>
Sourcepub fn no_reference(self) -> Migrated<'static, T>
pub fn no_reference(self) -> Migrated<'static, T>
The table has the #[no_reference] attribute, so partial migration is always ok.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for MigratedOptional<T>
impl<T> !Send for MigratedOptional<T>
impl<T> !Sync for MigratedOptional<T>
impl<T> !UnwindSafe for MigratedOptional<T>
impl<T> Freeze for MigratedOptional<T>
impl<T> Unpin for MigratedOptional<T>
impl<T> UnsafeUnpin for MigratedOptional<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