pub trait SnapshotRepository {
// Required methods
fn write_snapshot(
&self,
entries: &[StoredEntry],
timestamp_ms: u64,
compression: SnapshotCompression,
) -> Result<PathBuf>;
fn load_latest_snapshot(&self) -> Result<Option<LoadedSnapshot>>;
}Expand description
Snapshot persistence behavior used by WAL recovery and embedded callers.
Required Methods§
Sourcefn 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.
Sourcefn 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.