Skip to main content

SnapshotSink

Trait SnapshotSink 

Source
pub trait SnapshotSink: Send + Sync {
    // Required method
    fn write_snapshot(&self, snapshot: &TileSnapshot) -> ArrayResult<()>;
}
Expand description

Receiver for completed snapshots during GC compaction.

Implementations live in nodedb-lite (redb-backed) and nodedb (WAL-backed) and are wired in later phases. This trait gives the pure GC logic in crate::sync::gc a place to write snapshots before dropping the underlying ops from the log.

Required Methods§

Source

fn write_snapshot(&self, snapshot: &TileSnapshot) -> ArrayResult<()>

Persist a completed snapshot.

Implementors§