pub struct MigrationManager { /* private fields */ }
Expand description
Migration manager implementation
Implementations§
Source§impl MigrationManager
impl MigrationManager
Sourcepub fn register_version(
&mut self,
_apiversion: &ApiVersion,
) -> Result<(), CoreError>
pub fn register_version( &mut self, _apiversion: &ApiVersion, ) -> Result<(), CoreError>
Register a version for migration planning
Sourcepub fn create_migration_plan(
&self,
from_version: &Version,
toversion: &Version,
) -> Result<MigrationPlan, CoreError>
pub fn create_migration_plan( &self, from_version: &Version, toversion: &Version, ) -> Result<MigrationPlan, CoreError>
Create a migration plan between versions
Sourcepub fn has_migration_path(
&self,
from_version: &Version,
toversion: &Version,
) -> bool
pub fn has_migration_path( &self, from_version: &Version, toversion: &Version, ) -> bool
Check if a migration path exists
Sourcepub fn start_migration(
&mut self,
plan: MigrationPlan,
executionid: String,
) -> Result<(), CoreError>
pub fn start_migration( &mut self, plan: MigrationPlan, executionid: String, ) -> Result<(), CoreError>
Start migration execution
Sourcepub fn id_2(&self, executionid: &str) -> Option<&MigrationExecution>
pub fn id_2(&self, executionid: &str) -> Option<&MigrationExecution>
Get migration execution status
Sourcepub fn cleanup_old_plans(&mut self) -> Result<usize, CoreError>
pub fn cleanup_old_plans(&mut self) -> Result<usize, CoreError>
Clean up old migration plans
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MigrationManager
impl RefUnwindSafe for MigrationManager
impl Send for MigrationManager
impl Sync for MigrationManager
impl Unpin for MigrationManager
impl UnwindSafe for MigrationManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more