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, TVal> PartialEq<Node<TKey, TVal>> for Node<TKey, TVal>where
TKey: PartialEq<TKey>,
TVal: PartialEq<TVal>,
impl<TKey, TVal> PartialEq<Node<TKey, TVal>> for Node<TKey, TVal>where TKey: PartialEq<TKey>, TVal: PartialEq<TVal>,
impl<TKey, TVal> Eq for Node<TKey, TVal>where TKey: Eq, TVal: Eq,
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