pub struct BackupLayoutGuard { /* private fields */ }Expand description
Exclusive access to an existing resolved backup layout and its dependencies.
All layout writers/removers must use the same parent-side lock. The operator owns the trusted parent; this guard does not fence arbitrary filesystem writers.
Implementations§
Source§impl BackupLayoutGuard
impl BackupLayoutGuard
Sourcepub fn acquire(root: &Path) -> Result<Self, JournalLockError>
pub fn acquire(root: &Path) -> Result<Self, JournalLockError>
Resolve and exclusively lock an existing directory without recreating it.
An explicitly selected root symlink resolves once. The lock remains beside the resolved directory, including after that directory is removed.
§Errors
Returns lock contention, unsafe lock entries, missing roots or IO failures.
Sourcepub fn restore_references(
&self,
) -> Result<RestoreReferencesRecord, PersistenceError>
pub fn restore_references( &self, ) -> Result<RestoreReferencesRecord, PersistenceError>
Read bounded, validated restore dependencies; absent records mean empty.
§Errors
Rejects replaced layouts, unsafe entries, invalid records and IO failures.
Sourcepub fn has_restore_references(&self) -> Result<bool, PersistenceError>
pub fn has_restore_references(&self) -> Result<bool, PersistenceError>
Report retained dependencies even if their external journals are missing.
§Errors
Returns the same conservative read failures as Self::restore_references.
Sourcepub fn retain_restore(
&self,
journal: &Path,
authority: &str,
) -> Result<RestoreReferenceRecord, PersistenceError>
pub fn retain_restore( &self, journal: &Path, authority: &str, ) -> Result<RestoreReferenceRecord, PersistenceError>
Durably retain exact immutable restore intent before publishing its journal.
Resolve the existing journal parent once; the journal itself may be absent. This binds local custody only and does not establish restore authority. No release operation is exposed until terminal/custody contracts are implemented.
§Errors
Rejects conflicting intent, invalid locations, unsafe records, limits and IO failures.