pub struct RestoreManager { /* private fields */ }Expand description
Handles restoring from backups
Implementations§
Source§impl RestoreManager
impl RestoreManager
Sourcepub fn new(paths: EnvelopePaths) -> Self
pub fn new(paths: EnvelopePaths) -> Self
Create a new RestoreManager
Sourcepub fn restore_from_file(
&self,
backup_path: &Path,
) -> EnvelopeResult<RestoreResult>
pub fn restore_from_file( &self, backup_path: &Path, ) -> EnvelopeResult<RestoreResult>
Restore data from a backup file
This will overwrite all current data with the backup contents. It’s recommended to create a backup before restoring.
Sourcepub fn restore_from_archive(
&self,
archive: &BackupArchive,
) -> EnvelopeResult<RestoreResult>
pub fn restore_from_archive( &self, archive: &BackupArchive, ) -> EnvelopeResult<RestoreResult>
Restore data from a parsed backup archive
Sourcepub fn validate_backup(
&self,
backup_path: &Path,
) -> EnvelopeResult<ValidationResult>
pub fn validate_backup( &self, backup_path: &Path, ) -> EnvelopeResult<ValidationResult>
Validate a backup file without restoring it
Auto Trait Implementations§
impl Freeze for RestoreManager
impl RefUnwindSafe for RestoreManager
impl Send for RestoreManager
impl Sync for RestoreManager
impl Unpin for RestoreManager
impl UnwindSafe for RestoreManager
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