pub enum State {
Idle,
Applying {
migrations: Vec<Migration>,
},
InProgress {
migrations: Vec<Migration>,
},
Completing {
migrations: Vec<Migration>,
current_migration_index: usize,
current_action_index: usize,
},
Aborting {
migrations: Vec<Migration>,
last_migration_index: usize,
last_action_index: usize,
},
}Variants§
Implementations§
Source§impl State
impl State
pub fn load(db: &mut impl Conn) -> Result<State>
pub fn save(&self, db: &mut impl Conn) -> Result<()>
pub fn clear(&mut self, db: &mut impl Conn) -> Result<()>
pub fn complete(&mut self, db: &mut impl Conn) -> Result<()>
pub fn applying(&mut self, new_migrations: Vec<Migration>)
pub fn in_progress(&mut self, new_migrations: Vec<Migration>)
pub fn completing( &mut self, migrations: Vec<Migration>, current_migration_index: usize, current_action_index: usize, )
pub fn aborting( &mut self, migrations: Vec<Migration>, last_migration_index: usize, last_action_index: usize, )
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for State
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
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