pub struct SnapshotStore { /* private fields */ }Expand description
Filesystem-backed snapshot repository.
SnapshotStore owns the directory scanning and file IO concerns. The
binary snapshot format stays isolated in SnapshotCodec, which makes it
easier to evolve the on-disk representation without spreading parsing logic
through persistence recovery.
Implementations§
Trait Implementations§
Source§impl Clone for SnapshotStore
impl Clone for SnapshotStore
Source§fn clone(&self) -> SnapshotStore
fn clone(&self) -> SnapshotStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnapshotStore
impl Debug for SnapshotStore
Source§impl SnapshotRepository for SnapshotStore
impl SnapshotRepository for SnapshotStore
Source§fn write_snapshot(
&self,
entries: &[StoredEntry],
timestamp_ms: u64,
compression: SnapshotCompression,
) -> Result<PathBuf>
fn write_snapshot( &self, entries: &[StoredEntry], timestamp_ms: u64, compression: SnapshotCompression, ) -> Result<PathBuf>
Writes
entries into a timestamped snapshot file and returns its path.Source§fn load_latest_snapshot(&self) -> Result<Option<LoadedSnapshot>>
fn load_latest_snapshot(&self) -> Result<Option<LoadedSnapshot>>
Loads the newest snapshot file in the repository, if one exists.
Auto Trait Implementations§
impl Freeze for SnapshotStore
impl RefUnwindSafe for SnapshotStore
impl Send for SnapshotStore
impl Sync for SnapshotStore
impl Unpin for SnapshotStore
impl UnsafeUnpin for SnapshotStore
impl UnwindSafe for SnapshotStore
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