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
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more