pub struct RetainedAcknowledgementChain {
pub chain: BTreeMap<u64, (StoreAckRef, StoreAck)>,
pub activating_commit: StoreBatchCommitRef,
pub activating_commit_value: StoreBatchCommit,
}Expand description
A device’s acknowledgement chain, contiguous from sequence one, carried by a snapshot’s portable summary.
This is the one place the whole chain belongs. A device restoring from a snapshot has no retained rows to walk, so the summary has to state the contiguity itself; it is folded once per snapshot generation from the rows the snapshot covers, rather than rebuilt into every row.
Fields§
§chain: BTreeMap<u64, (StoreAckRef, StoreAck)>§activating_commit: StoreBatchCommitRef§activating_commit_value: StoreBatchCommitImplementations§
Source§impl RetainedAcknowledgementChain
impl RetainedAcknowledgementChain
Sourcepub fn activated(
activated: &RetainedVerifiedActivatedAck,
activating_commit_value: &StoreBatchCommit,
) -> Self
pub fn activated( activated: &RetainedVerifiedActivatedAck, activating_commit_value: &StoreBatchCommit, ) -> Self
Start a chain from the one acknowledgement a commit activated. Contiguity
is not claimed yet: extend adds the rest, and
validate_chain is what asserts the result runs
from sequence one.
Sourcepub fn extend(
&mut self,
activated: &RetainedVerifiedActivatedAck,
activating_commit_value: &StoreBatchCommit,
) -> bool
pub fn extend( &mut self, activated: &RetainedVerifiedActivatedAck, activating_commit_value: &StoreBatchCommit, ) -> bool
Fold one more retained acknowledgement in. A sequence already present must carry the same acknowledgement — two different ones at one sequence is a forked chain, not a longer one. The activating commit tracks the highest sequence, which is the one the summary reports.
pub fn latest(&self) -> Option<&(StoreAckRef, StoreAck)>
pub fn exactly_extends(&self, predecessor: &Self) -> bool
pub fn validate_chain( &self, root: &StoreRootRef, registration: &ReferencedStoreDeviceRegistration, ) -> Result<(), StoreProtocolError>
Trait Implementations§
Source§impl Clone for RetainedAcknowledgementChain
impl Clone for RetainedAcknowledgementChain
Source§fn clone(&self) -> RetainedAcknowledgementChain
fn clone(&self) -> RetainedAcknowledgementChain
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RetainedAcknowledgementChain
impl Debug for RetainedAcknowledgementChain
Source§impl<'de> Deserialize<'de> for RetainedAcknowledgementChain
impl<'de> Deserialize<'de> for RetainedAcknowledgementChain
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>,
Source§impl PartialEq for RetainedAcknowledgementChain
impl PartialEq for RetainedAcknowledgementChain
Source§fn eq(&self, other: &RetainedAcknowledgementChain) -> bool
fn eq(&self, other: &RetainedAcknowledgementChain) -> bool
self and other values to be equal, and is used by ==.impl Eq for RetainedAcknowledgementChain
impl StructuralPartialEq for RetainedAcknowledgementChain
Auto Trait Implementations§
impl !Freeze for RetainedAcknowledgementChain
impl RefUnwindSafe for RetainedAcknowledgementChain
impl Send for RetainedAcknowledgementChain
impl Sync for RetainedAcknowledgementChain
impl Unpin for RetainedAcknowledgementChain
impl UnsafeUnpin for RetainedAcknowledgementChain
impl UnwindSafe for RetainedAcknowledgementChain
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
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
§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
key and return true if they are equal.