pub struct BackupManager { /* private fields */ }Expand description
Manages backup creation, retention, and restoration
Implementations§
Source§impl BackupManager
impl BackupManager
Sourcepub fn new(backup_dir: PathBuf, retention_count: usize) -> Self
pub fn new(backup_dir: PathBuf, retention_count: usize) -> Self
Creates a new BackupManager instance
§Arguments
backup_dir- Directory where backups will be storedretention_count- Number of backups to keep per file (default: 10)
Sourcepub async fn create_backup(
&self,
path: &Path,
) -> Result<BackupMetadata, FileError>
pub async fn create_backup( &self, path: &Path, ) -> Result<BackupMetadata, FileError>
Sourcepub async fn restore_from_backup(
&self,
backup_path: &Path,
target_path: &Path,
) -> Result<(), FileError>
pub async fn restore_from_backup( &self, backup_path: &Path, target_path: &Path, ) -> Result<(), FileError>
Trait Implementations§
Source§impl Clone for BackupManager
impl Clone for BackupManager
Source§fn clone(&self) -> BackupManager
fn clone(&self) -> BackupManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackupManager
impl Debug for BackupManager
Auto Trait Implementations§
impl Freeze for BackupManager
impl RefUnwindSafe for BackupManager
impl Send for BackupManager
impl Sync for BackupManager
impl Unpin 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