Skip to main content

SnapshotRecord

Enum SnapshotRecord 

Source
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

Source

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.

Source

pub fn decode_checked<O: WriteOracle>( frame: &[u8], oracle: &O, ) -> Result<Self, O::Error>
where O::Error: From<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.

Source

pub fn section(&self) -> usize

The section the record belongs to.

Source

pub fn validate_coverage<S: WriteSlots>( &self, covers: u64, slots: &S, ) -> Result<(), S::Error>
where S::Error: From<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>

Source§

fn clone(&self) -> SnapshotRecord<E>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E: Debug> Debug for SnapshotRecord<E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<E: PartialEq> PartialEq for SnapshotRecord<E>

Source§

fn eq(&self, other: &SnapshotRecord<E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<E: Eq> Eq for SnapshotRecord<E>

Source§

impl<E> StructuralPartialEq for SnapshotRecord<E>

Auto Trait Implementations§

§

impl<E> Freeze for SnapshotRecord<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for SnapshotRecord<E>
where E: RefUnwindSafe,

§

impl<E> Send for SnapshotRecord<E>
where E: Send,

§

impl<E> Sync for SnapshotRecord<E>
where E: Sync,

§

impl<E> Unpin for SnapshotRecord<E>
where E: Unpin,

§

impl<E> UnsafeUnpin for SnapshotRecord<E>
where E: UnsafeUnpin,

§

impl<E> UnwindSafe for SnapshotRecord<E>
where E: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,