pub struct InstalledReplayBaseline { /* private fields */ }Expand description
The replay baseline a device stands on, as the history verifier needs it.
The snapshot owns its coverage and aggregate history state. Exact states at individual covered commits remain separate: the snapshot’s aggregate state cannot answer which devices were active at an earlier commit. Snapshot retention preserves those mappings while other commits still need them.
Without an installed snapshot, coverage is empty and history walks reach genesis.
Implementations§
Source§impl InstalledReplayBaseline
impl InstalledReplayBaseline
pub fn from_snapshot( snapshot: PublishedStoreSnapshot, covered_states: BTreeMap<StoreBatchCommitRef, Arc<ResolvedStoreDeviceState>>, ) -> Self
Sourcepub fn stands_on(&self, snapshot: &StoreSnapshotRef) -> bool
pub fn stands_on(&self, snapshot: &StoreSnapshotRef) -> bool
Whether this baseline was installed from snapshot itself.
Sourcepub fn snapshot(&self) -> Option<&PublishedStoreSnapshot>
pub fn snapshot(&self) -> Option<&PublishedStoreSnapshot>
The exact snapshot installed as this replay’s starting point.
pub fn coverage(&self) -> &CommitFrontier
Sourcepub fn covers(&self, reference: &StoreBatchCommitRef) -> bool
pub fn covers(&self, reference: &StoreBatchCommitRef) -> bool
Whether the baseline restates reference, so no walk need pass it.
Sourcepub fn covered_state(
&self,
reference: &StoreBatchCommitRef,
) -> Option<&ResolvedStoreDeviceState>
pub fn covered_state( &self, reference: &StoreBatchCommitRef, ) -> Option<&ResolvedStoreDeviceState>
The device state that stood at a covered position, or None when this
device never recorded one there — which is a commit naming a position
outside its own history, not a baseline that lost something.
pub fn covered_states( &self, ) -> impl Iterator<Item = (&StoreBatchCommitRef, &ResolvedStoreDeviceState)>
Trait Implementations§
Source§impl Clone for InstalledReplayBaseline
impl Clone for InstalledReplayBaseline
Source§fn clone(&self) -> InstalledReplayBaseline
fn clone(&self) -> InstalledReplayBaseline
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more