pub struct Alter<'t, 'a, From, To> { /* private fields */ }
Expand description
This is the type used to return table alterations in migrations.
Note that migrations allow you to use anything that implements crate::Dummy to specify the new values. In particular this allows mapping values using native rust with crate::Dummy::map_dummy.
Take a look at the documentation of crate::migration::schema for more general information.
The purpose of wrapping migration results in Alter (and Create) is to dyn box the type so that type inference works.
(Type inference is problematic with higher ranked generic returns from closures)
Futhermore Alter (and Create) also have an implied bound of 'a: 't
which makes it easier to implement migrations.
Implementations§
Auto Trait Implementations§
impl<'t, 'a, From, To> Freeze for Alter<'t, 'a, From, To>
impl<'t, 'a, From, To> !RefUnwindSafe for Alter<'t, 'a, From, To>
impl<'t, 'a, From, To> !Send for Alter<'t, 'a, From, To>
impl<'t, 'a, From, To> !Sync for Alter<'t, 'a, From, To>
impl<'t, 'a, From, To> Unpin for Alter<'t, 'a, From, To>
impl<'t, 'a, From, To> !UnwindSafe for Alter<'t, 'a, From, To>
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