pub struct InstalledReplayBaseline { /* private fields */ }Expand description
The replay baseline a device stands on, as the history verifier needs it.
A device that installed or advanced a baseline holds one signed image in
place of the commits under coverage, and the rows those commits produced
are gone. So a walk that reaches a covered position has nothing left to walk
to — and nothing to prove, because the baseline already restates the result.
It stops there instead, and reads the position’s device state out of
covered_states, which is what retain_snapshot_device_states keeps alive
for exactly the positions commits above the coverage still name.
A device on a genesis baseline has an empty coverage, so every walk runs to genesis as it always did.
Implementations§
Source§impl InstalledReplayBaseline
impl InstalledReplayBaseline
pub fn new( coverage: CommitFrontier, covered_states: BTreeMap<StoreBatchCommitRef, Arc<ResolvedStoreDeviceState>>, summary: Option<OpenedRetainedMergeHistorySummary>, snapshot: Option<StoreSnapshotRef>, ) -> 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 history_summary(&self) -> Option<&OpenedRetainedMergeHistorySummary>
pub fn history_summary(&self) -> Option<&OpenedRetainedMergeHistorySummary>
The signed history summary standing for everything under the coverage.
A composition that walked to genesis produced this from the commits themselves; one that stops at the baseline starts from it instead. Both arrive at the same summary, which is what makes a summary a summary.
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