pub struct BackupPaths {
pub workload: PathBuf,
pub bak: PathBuf,
pub bak_prev: PathBuf,
pub temp: PathBuf,
}Expand description
Sibling-file paths for one workload.
Fields§
§workload: PathBufThe workload file itself.
bak: PathBuf<workload>.bak — most-recent prior content.
bak_prev: PathBuf<workload>.bak.prev — one step further back.
temp: PathBufTempfile used for the atomic write of the new
content; renamed over workload once the buffer is
flushed.
Implementations§
Source§impl BackupPaths
impl BackupPaths
Sourcepub fn for_workload(workload_path: &Path) -> Self
pub fn for_workload(workload_path: &Path) -> Self
Derive the sibling-file paths for workload_path.
Convention: <file>.bak, <file>.bak.prev, and
<file>.tmp all live in the same directory as the
workload, so the renames stay within one filesystem
(atomic).
Trait Implementations§
Source§impl Clone for BackupPaths
impl Clone for BackupPaths
Auto Trait Implementations§
impl Freeze for BackupPaths
impl RefUnwindSafe for BackupPaths
impl Send for BackupPaths
impl Sync for BackupPaths
impl Unpin for BackupPaths
impl UnsafeUnpin for BackupPaths
impl UnwindSafe for BackupPaths
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