Skip to main content

SnapshotRepository

Trait SnapshotRepository 

Source
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§

Source

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>>

Loads the newest snapshot file in the repository, if one exists.

Implementors§