pub struct Node<TNodeId, TVal: Eq> {
pub key: Key<TNodeId>,
pub value: TVal,
pub status: NodeStatus,
}Expand description
A Node in a bucket, representing a peer participating
in the Kademlia DHT together with an associated value (e.g. contact
information).
Fields§
§key: Key<TNodeId>The key of the node, identifying the peer.
value: TValThe associated value.
status: NodeStatusThe status of the node.
Trait Implementations§
impl<TNodeId: Eq, TVal: Eq + Eq> Eq for Node<TNodeId, TVal>
impl<TNodeId, TVal: Eq> StructuralPartialEq for Node<TNodeId, TVal>
Auto Trait Implementations§
impl<TNodeId, TVal> Freeze for Node<TNodeId, TVal>
impl<TNodeId, TVal> RefUnwindSafe for Node<TNodeId, TVal>where
TVal: RefUnwindSafe,
TNodeId: RefUnwindSafe,
impl<TNodeId, TVal> Send for Node<TNodeId, TVal>
impl<TNodeId, TVal> Sync for Node<TNodeId, TVal>
impl<TNodeId, TVal> Unpin for Node<TNodeId, TVal>
impl<TNodeId, TVal> UnwindSafe for Node<TNodeId, TVal>where
TVal: UnwindSafe,
TNodeId: UnwindSafe,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.