pub struct RetainedReplaySnapshotAuthority {
pub store_root: StoreRootRef,
pub founder_registration: StoreDeviceRegistrationRef,
pub snapshot: StoreSnapshotRef,
pub metadata: SnapshotMeta,
pub active_registrations: BTreeMap<StoreDeviceId, ReferencedStoreDeviceRegistration>,
}Expand description
Everything a device needs to install one snapshot as its starting state and verify what arrives after it: the Store root and founder it belongs to, the signed metadata, the cut it covers, and the device state and registrations active at that cut.
Every field is re-derived from the signed metadata by
validate, so an installing device trusts the owner’s
signature over the snapshot and nothing local. What is deliberately absent
is any claim about the other devices having caught up: that is
a separate access concern. A device installing
a baseline verifies each later commit against the registrations and device
state carried here, exactly as a device that never installed a snapshot
verifies them against its own history.
Fields§
§store_root: StoreRootRef§founder_registration: StoreDeviceRegistrationRef§snapshot: StoreSnapshotRef§metadata: SnapshotMeta§active_registrations: BTreeMap<StoreDeviceId, ReferencedStoreDeviceRegistration>Implementations§
Source§impl RetainedReplaySnapshotAuthority
impl RetainedReplaySnapshotAuthority
pub fn validate(&self) -> Result<(), StoreProtocolError>
Trait Implementations§
Source§impl Clone for RetainedReplaySnapshotAuthority
impl Clone for RetainedReplaySnapshotAuthority
Source§fn clone(&self) -> RetainedReplaySnapshotAuthority
fn clone(&self) -> RetainedReplaySnapshotAuthority
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for RetainedReplaySnapshotAuthority
impl<'de> Deserialize<'de> for RetainedReplaySnapshotAuthority
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RetainedReplaySnapshotAuthority
impl PartialEq for RetainedReplaySnapshotAuthority
Source§fn eq(&self, other: &RetainedReplaySnapshotAuthority) -> bool
fn eq(&self, other: &RetainedReplaySnapshotAuthority) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RetainedReplaySnapshotAuthority
impl StructuralPartialEq for RetainedReplaySnapshotAuthority
Auto Trait Implementations§
impl !Freeze for RetainedReplaySnapshotAuthority
impl RefUnwindSafe for RetainedReplaySnapshotAuthority
impl Send for RetainedReplaySnapshotAuthority
impl Sync for RetainedReplaySnapshotAuthority
impl Unpin for RetainedReplaySnapshotAuthority
impl UnsafeUnpin for RetainedReplaySnapshotAuthority
impl UnwindSafe for RetainedReplaySnapshotAuthority
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.