pub struct CheckpointsRepo<'a> { /* private fields */ }Implementations§
Source§impl CheckpointsRepo<'_>
impl CheckpointsRepo<'_>
pub fn create(&self, new: NewCheckpoint) -> Result<CheckpointRecord>
pub fn get(&self, id: &str) -> Result<Option<CheckpointRecord>>
pub fn set_approval(&self, id: &str, approval_id: &str) -> Result<()>
Sourcepub fn delete(&self, id: &str) -> Result<bool>
pub fn delete(&self, id: &str) -> Result<bool>
Delete a checkpoint row outright. Returns whether a row was removed.
F23 (RC-F): coordinates the on-disk checkpoint-dir GC
(crate::checkpoint::gc_old_checkpoint_dirs) with the DB. The dir GC
prunes by mtime regardless of archive state, while storage Self /
gc() only removes ARCHIVED checkpoint rows — so a never-archived old
checkpoint would lose its directory while its row survived, and a later
restore_checkpoint would fail on the missing manifest. The dir GC now
calls this so list() and the on-disk dirs stay in agreement.
pub fn list(&self, limit: usize) -> Result<Vec<CheckpointRecord>>
pub fn list_all(&self, limit: usize) -> Result<Vec<CheckpointRecord>>
pub fn archive(&self, ids: &[String], reason: &str) -> Result<usize>
pub fn count_archived(&self) -> Result<usize>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CheckpointsRepo<'a>
impl<'a> !Send for CheckpointsRepo<'a>
impl<'a> !Sync for CheckpointsRepo<'a>
impl<'a> !UnwindSafe for CheckpointsRepo<'a>
impl<'a> Freeze for CheckpointsRepo<'a>
impl<'a> Unpin for CheckpointsRepo<'a>
impl<'a> UnsafeUnpin for CheckpointsRepo<'a>
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