pub struct BackupManager {
pub strategy: BackupStrategy,
pub backup_path: PathBuf,
pub metadata: HashMap<String, String>,
}Expand description
Backup manager for migration safety
Fields§
§strategy: BackupStrategyBackup strategy
backup_path: PathBufBackup location
metadata: HashMap<String, String>Backup metadata
Implementations§
Source§impl BackupManager
impl BackupManager
pub fn new(strategy: BackupStrategy, backup_path: PathBuf) -> Self
Sourcepub fn create_backup(&mut self, data_path: &Path) -> Result<String>
pub fn create_backup(&mut self, data_path: &Path) -> Result<String>
Create backup before migration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BackupManager
impl RefUnwindSafe for BackupManager
impl Send for BackupManager
impl Sync for BackupManager
impl Unpin for BackupManager
impl UnsafeUnpin for BackupManager
impl UnwindSafe for BackupManager
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