pub enum KademliaBucketInserts {
OnConnected,
Manual,
}
Expand description
The configurable strategies for the insertion of peers and their addresses into the k-buckets of the Kademlia routing table.
Variants§
OnConnected
Whenever a connection to a peer is established as a result of a dialing attempt and that peer is not yet in the routing table, it is inserted as long as there is a free slot in the corresponding k-bucket. If the k-bucket is full but still has a free pending slot, it may be inserted into the routing table at a later time if an unresponsive disconnected peer is evicted from the bucket.
Manual
New peers and addresses are only added to the routing table via
explicit calls to Kademlia::add_address
.
Note: Even though peers can only get into the routing table as a result of
Kademlia::add_address
, routing table entries are still updated as peers connect and disconnect (i.e. the order of the entries as well as the network addresses).
Trait Implementations§
source§impl Clone for KademliaBucketInserts
impl Clone for KademliaBucketInserts
source§fn clone(&self) -> KademliaBucketInserts
fn clone(&self) -> KademliaBucketInserts
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KademliaBucketInserts
impl Debug for KademliaBucketInserts
source§impl PartialEq for KademliaBucketInserts
impl PartialEq for KademliaBucketInserts
source§fn eq(&self, other: &KademliaBucketInserts) -> bool
fn eq(&self, other: &KademliaBucketInserts) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for KademliaBucketInserts
impl Eq for KademliaBucketInserts
impl StructuralPartialEq for KademliaBucketInserts
Auto Trait Implementations§
impl Freeze for KademliaBucketInserts
impl RefUnwindSafe for KademliaBucketInserts
impl Send for KademliaBucketInserts
impl Sync for KademliaBucketInserts
impl Unpin for KademliaBucketInserts
impl UnwindSafe for KademliaBucketInserts
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)