Struct xstack_kad::KBucketTable
source · pub struct KBucketTable<const K: usize> { /* private fields */ }
Expand description
A rust implementation of the k-bucket data structure outlined in the Kademlia paper
Unlike the paper description, the only data stored by this implementation is the PeerId
,
develpers can call lookup_peer_info
function to get the more data associated with the it.
Implementations§
Trait Implementations§
source§impl<const K: usize> Clone for KBucketTable<K>
impl<const K: usize> Clone for KBucketTable<K>
source§fn clone(&self) -> KBucketTable<K>
fn clone(&self) -> KBucketTable<K>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<const K: usize> Freeze for KBucketTable<K>
impl<const K: usize> !RefUnwindSafe for KBucketTable<K>
impl<const K: usize> Send for KBucketTable<K>
impl<const K: usize> Sync for KBucketTable<K>
impl<const K: usize> Unpin for KBucketTable<K>
impl<const K: usize> !UnwindSafe for KBucketTable<K>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)