pub struct PeerSnapshot {
pub idx: u32,
pub dc: String,
pub rack: String,
pub host: String,
pub port: u16,
pub tokens: Vec<u32>,
pub state: PeerState,
pub is_local: bool,
}Expand description
Snapshot of one peer the admin layer reports back over the PBC. The shape is intentionally small and self-describing so the wire format can serialise every field with no further lookups.
Fields§
§idx: u32Peer index in the pool’s peer array. Stable for the lifetime of the peer.
dc: StringDatacenter name.
rack: StringRack name.
host: StringHostname or numeric IP.
port: u16TCP port.
tokens: Vec<u32>Token list rendered as the same u32 integers the engine
uses for ring lookups.
state: PeerStateLifecycle state.
is_local: boolTrue for the local peer (peer index 0 in conforming configurations).
Trait Implementations§
Source§impl Clone for PeerSnapshot
impl Clone for PeerSnapshot
Source§fn clone(&self) -> PeerSnapshot
fn clone(&self) -> PeerSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeerSnapshot
impl Debug for PeerSnapshot
Source§impl PartialEq for PeerSnapshot
impl PartialEq for PeerSnapshot
Source§fn eq(&self, other: &PeerSnapshot) -> bool
fn eq(&self, other: &PeerSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PeerSnapshot
impl StructuralPartialEq for PeerSnapshot
Auto Trait Implementations§
impl Freeze for PeerSnapshot
impl RefUnwindSafe for PeerSnapshot
impl Send for PeerSnapshot
impl Sync for PeerSnapshot
impl Unpin for PeerSnapshot
impl UnsafeUnpin for PeerSnapshot
impl UnwindSafe for PeerSnapshot
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.