pub struct NodeId {
pub addr: SocketAddr,
pub name: String,
pub incarnation: u64,
}Expand description
Node identity in the gossip mesh. Includes the address (for routing) and a monotonic incarnation counter (for conflict resolution on rejoin).
Fields§
§addr: SocketAddr§name: String§incarnation: u64Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
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 Identity for NodeId
impl Identity for NodeId
Source§type Addr = SocketAddr
type Addr = SocketAddr
The type of the unique (cluster-wide) address of this identity Read more
Source§fn addr(&self) -> SocketAddr
fn addr(&self) -> SocketAddr
Return this identity’s unique address Read more
Source§fn renew(&self) -> Option<Self>
fn renew(&self) -> Option<Self>
Opt-in on auto-rejoining by providing a new identity. Read more
Source§fn win_addr_conflict(&self, adversary: &Self) -> bool
fn win_addr_conflict(&self, adversary: &Self) -> bool
Decides which to keep when Foca encounters multiple identities
sharing the same address Read more
impl Eq for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnsafeUnpin for NodeId
impl UnwindSafe for NodeId
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