pub struct BackupLayout { /* private fields */ }Expand description
BackupLayout
Implementations§
Source§impl BackupLayout
impl BackupLayout
Sourcepub const fn new(root: PathBuf) -> Self
pub const fn new(root: PathBuf) -> Self
Create a filesystem layout rooted at one backup directory.
Sourcepub fn manifest_path(&self) -> PathBuf
pub fn manifest_path(&self) -> PathBuf
Return the canonical manifest path for this backup layout.
Sourcepub fn journal_path(&self) -> PathBuf
pub fn journal_path(&self) -> PathBuf
Return the canonical mutable journal path for this backup layout.
Sourcepub fn write_manifest(
&self,
manifest: &FleetBackupManifest,
) -> Result<(), PersistenceError>
pub fn write_manifest( &self, manifest: &FleetBackupManifest, ) -> Result<(), PersistenceError>
Write a validated manifest with atomic replace semantics.
Sourcepub fn read_manifest(&self) -> Result<FleetBackupManifest, PersistenceError>
pub fn read_manifest(&self) -> Result<FleetBackupManifest, PersistenceError>
Read and validate a manifest from this backup layout.
Sourcepub fn write_journal(
&self,
journal: &DownloadJournal,
) -> Result<(), PersistenceError>
pub fn write_journal( &self, journal: &DownloadJournal, ) -> Result<(), PersistenceError>
Write a validated download journal with atomic replace semantics.
Sourcepub fn read_journal(&self) -> Result<DownloadJournal, PersistenceError>
pub fn read_journal(&self) -> Result<DownloadJournal, PersistenceError>
Read and validate a download journal from this backup layout.
Trait Implementations§
Source§impl Clone for BackupLayout
impl Clone for BackupLayout
Source§fn clone(&self) -> BackupLayout
fn clone(&self) -> BackupLayout
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 moreAuto Trait Implementations§
impl Freeze for BackupLayout
impl RefUnwindSafe for BackupLayout
impl Send for BackupLayout
impl Sync for BackupLayout
impl Unpin for BackupLayout
impl UnsafeUnpin for BackupLayout
impl UnwindSafe for BackupLayout
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