pub struct CheckpointManager { /* private fields */ }Expand description
Manages checkpoints storage
Implementations§
Source§impl CheckpointManager
impl CheckpointManager
pub fn new(base_dir: PathBuf) -> Result<Self>
Sourcepub fn with_full_snapshot_interval(self, interval: usize) -> Self
pub fn with_full_snapshot_interval(self, interval: usize) -> Self
Set the interval for full snapshots
Sourcepub fn create_checkpoint(
&mut self,
operation_id: &str,
source_dir: &Path,
) -> Result<Checkpoint>
pub fn create_checkpoint( &mut self, operation_id: &str, source_dir: &Path, ) -> Result<Checkpoint>
Create a checkpoint for the given source directory
Sourcepub fn load_checkpoint(&self, checkpoint_id: &str) -> Result<Option<Checkpoint>>
pub fn load_checkpoint(&self, checkpoint_id: &str) -> Result<Option<Checkpoint>>
Load a checkpoint by ID
Sourcepub fn restore_checkpoint(
&self,
checkpoint_id: &str,
target_dir: &Path,
) -> Result<()>
pub fn restore_checkpoint( &self, checkpoint_id: &str, target_dir: &Path, ) -> Result<()>
Restore a checkpoint to the target directory
Sourcepub fn list_checkpoints(&self) -> &[CheckpointEntry]
pub fn list_checkpoints(&self) -> &[CheckpointEntry]
List all checkpoints
Auto Trait Implementations§
impl Freeze for CheckpointManager
impl RefUnwindSafe for CheckpointManager
impl Send for CheckpointManager
impl Sync for CheckpointManager
impl Unpin for CheckpointManager
impl UnsafeUnpin for CheckpointManager
impl UnwindSafe for CheckpointManager
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