pub enum SnapshotRecord<E = WriteEvidence> {
Write(AppliedWrite),
Column(SyncedColumn),
Merge(MergeRow),
Loss(Loss),
Authored(AuthoredRecord),
Creation(Creation),
Evidence(E),
Admin(OriginalSlot),
KeyCopy(OriginalSlot),
Announcement(OriginalSlot),
Claim(LastClaim),
}Expand description
One bounded record in a snapshot, using the owners’ logical identities.
Variants§
Write(AppliedWrite)
Applied write metadata, before any row needing it is decoded.
Column(SyncedColumn)
A synced column.
Merge(MergeRow)
One row’s generations and winning cells, which are its values; losses travel separately.
Loss(Loss)
A displaced cell, removed row or excluded write’s row.
Authored(AuthoredRecord)
An accepted write part’s shared details, or one of its kept changes with its verdict, kept as source evidence.
Creation(Creation)
A row’s selected original creation (§9.6).
Evidence(E)
Another member’s write header, roots and openings in this audience.
Admin(OriginalSlot)
Original signed admin slots, including creation; store snapshots only.
KeyCopy(OriginalSlot)
Original signed key-copy slots; store snapshots only.
Announcement(OriginalSlot)
Original signed announcement slots; store snapshots only.
Claim(LastClaim)
Last claim included for each known device, including refused claims.
Implementations§
Source§impl SnapshotRecord
impl SnapshotRecord
Sourcepub fn try_map_evidence<E, X>(
self,
prepare: impl FnOnce(WriteEvidence) -> Result<E, X>,
) -> Result<SnapshotRecord<E>, X>
pub fn try_map_evidence<E, X>( self, prepare: impl FnOnce(WriteEvidence) -> Result<E, X>, ) -> Result<SnapshotRecord<E>, X>
Retain decoded records while replacing wire evidence with its checked form.
Sourcepub fn decode_checked<O: WriteOracle>(
frame: &[u8],
oracle: &O,
) -> Result<Self, O::Error>
pub fn decode_checked<O: WriteOracle>( frame: &[u8], oracle: &O, ) -> Result<Self, O::Error>
Read back a record frame that SnapshotDecoder::frame already
checked, as a loader staged it. Only the record’s own fields are read;
its order, coverage and the stream it came from are not checked again.
A merge row rebuilds its state with oracle, as stored rows do.
Sourcepub fn validate_coverage<S: WriteSlots>(
&self,
covers: u64,
slots: &S,
) -> Result<(), S::Error>
pub fn validate_coverage<S: WriteSlots>( &self, covers: u64, slots: &S, ) -> Result<(), S::Error>
Check references against authenticated published-write locations. Callers
populate these from section 0; unknown evidence cannot establish coverage.
A write whose slot or timestamp a loader reads must have its own entry
at or below covers. A write named only as an identity must have
landed: section 0 holds each device’s last write through coverage,
but not the entries no check reads (coven.md §16.7).
Trait Implementations§
Source§impl<E: Clone> Clone for SnapshotRecord<E>
impl<E: Clone> Clone for SnapshotRecord<E>
Source§fn clone(&self) -> SnapshotRecord<E>
fn clone(&self) -> SnapshotRecord<E>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more