pub struct CheckpointAssignmentFence {
pub assignment_version: u64,
pub partitioning_abi_version: u16,
pub vnode_count: u32,
pub assignment_digest: [u8; 32],
pub participants: Vec<CheckpointParticipant>,
}Expand description
Versioned proof of one exact vnode-owner map and its process-complete participant roster.
Fields§
§assignment_version: u64Exact vnode-assignment version covered by this proof.
partitioning_abi_version: u16Key encoding, hashing, and key-group mapping contract covered by this proof.
vnode_count: u32Number of vnodes in the ordered owner map.
assignment_digest: [u8; 32]SHA-256 of the partitioning ABI, vnode_count, and ordered vnode-to-owner map.
participants: Vec<CheckpointParticipant>Canonical participants, sorted by node id and bound to exact boot incarnations.
Implementations§
Source§impl CheckpointAssignmentFence
impl CheckpointAssignmentFence
Sourcepub fn from_owner_map(
assignment_version: u64,
owners: &[u64],
participants: Vec<CheckpointParticipant>,
) -> Result<Self, String>
pub fn from_owner_map( assignment_version: u64, owners: &[u64], participants: Vec<CheckpointParticipant>, ) -> Result<Self, String>
Build a certificate from the exact ordered vnode-owner map.
§Errors
Returns an error when the version, owner map, or participant roster is non-canonical.
Sourcepub fn owner_map_digest(vnode_count: u32, owners: &[u64]) -> [u8; 32]
pub fn owner_map_digest(vnode_count: u32, owners: &[u64]) -> [u8; 32]
Stable digest of the current partitioning ABI and a canonical ordered vnode-owner map.
Sourcepub fn is_canonical(&self) -> bool
pub fn is_canonical(&self) -> bool
Whether every field has its canonical production shape.
Sourcepub fn contains(&self, node_id: u64) -> bool
pub fn contains(&self, node_id: u64) -> bool
Whether node_id belongs to the canonical participant roster.
Sourcepub fn participant_incarnation(&self, node_id: u64) -> Option<Uuid>
pub fn participant_incarnation(&self, node_id: u64) -> Option<Uuid>
Exact boot identity certified for node_id.
Sourcepub fn participant_ids(&self) -> Vec<u64>
pub fn participant_ids(&self) -> Vec<u64>
Canonical participant node ids.
Sourcepub fn matches_owner_map(&self, owners: &[u64]) -> bool
pub fn matches_owner_map(&self, owners: &[u64]) -> bool
Whether this certificate binds the supplied exact ordered owner map.
Trait Implementations§
Source§impl Clone for CheckpointAssignmentFence
impl Clone for CheckpointAssignmentFence
Source§fn clone(&self) -> CheckpointAssignmentFence
fn clone(&self) -> CheckpointAssignmentFence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CheckpointAssignmentFence
impl Debug for CheckpointAssignmentFence
Source§impl<'de> Deserialize<'de> for CheckpointAssignmentFence
impl<'de> Deserialize<'de> for CheckpointAssignmentFence
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>,
impl Eq for CheckpointAssignmentFence
impl StructuralPartialEq for CheckpointAssignmentFence
Auto Trait Implementations§
impl Freeze for CheckpointAssignmentFence
impl RefUnwindSafe for CheckpointAssignmentFence
impl Send for CheckpointAssignmentFence
impl Sync for CheckpointAssignmentFence
impl Unpin for CheckpointAssignmentFence
impl UnsafeUnpin for CheckpointAssignmentFence
impl UnwindSafe for CheckpointAssignmentFence
Blanket Implementations§
impl<T> Allocation for T
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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.§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].