Struct libp2p_kad::kbucket::Node
source · pub struct Node<TKey, TVal> {
pub key: TKey,
pub value: TVal,
}
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: TKey
The key of the node, identifying the peer.
value: TVal
The associated value.
Trait Implementations§
source§impl<TKey: PartialEq, TVal: PartialEq> PartialEq<Node<TKey, TVal>> for Node<TKey, TVal>
impl<TKey: PartialEq, TVal: PartialEq> PartialEq<Node<TKey, TVal>> for Node<TKey, TVal>
impl<TKey: Eq, TVal: Eq> Eq for Node<TKey, TVal>
impl<TKey, TVal> StructuralEq for Node<TKey, TVal>
impl<TKey, TVal> StructuralPartialEq for Node<TKey, TVal>
Auto Trait Implementations§
impl<TKey, TVal> RefUnwindSafe for Node<TKey, TVal>where TKey: RefUnwindSafe, TVal: RefUnwindSafe,
impl<TKey, TVal> Send for Node<TKey, TVal>where TKey: Send, TVal: Send,
impl<TKey, TVal> Sync for Node<TKey, TVal>where TKey: Sync, TVal: Sync,
impl<TKey, TVal> Unpin for Node<TKey, TVal>where TKey: Unpin, TVal: Unpin,
impl<TKey, TVal> UnwindSafe for Node<TKey, TVal>where TKey: UnwindSafe, TVal: 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