Struct conserve::GarbageCollectionLock
source · pub struct GarbageCollectionLock { /* private fields */ }
Implementations§
source§impl GarbageCollectionLock
impl GarbageCollectionLock
Lock on an archive for gc, that excludes backups and gc by other processes.
The lock is released when the object is dropped.
sourcepub fn new(archive: &Archive) -> Result<GarbageCollectionLock>
pub fn new(archive: &Archive) -> Result<GarbageCollectionLock>
Lock this archive for garbage collection.
Returns Err(Error::DeleteWithIncompleteBackup)
if the last
backup is incomplete.
sourcepub fn break_lock(archive: &Archive) -> Result<GarbageCollectionLock>
pub fn break_lock(archive: &Archive) -> Result<GarbageCollectionLock>
Take a lock on an archive, breaking any existing gc lock.
Use this only if you’re confident that the process owning the lock has terminated and the lock is stale.
Trait Implementations§
source§impl Debug for GarbageCollectionLock
impl Debug for GarbageCollectionLock
Auto Trait Implementations§
impl !RefUnwindSafe for GarbageCollectionLock
impl Send for GarbageCollectionLock
impl Sync for GarbageCollectionLock
impl Unpin for GarbageCollectionLock
impl !UnwindSafe for GarbageCollectionLock
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