Enum BucketInserts
pub enum BucketInserts {
OnConnected,
Manual,
}
kad
only.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 Behaviour::add_address
.
Note: Even though peers can only get into the routing table as a result of
Behaviour::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§
§impl Clone for BucketInserts
impl Clone for BucketInserts
§fn clone(&self) -> BucketInserts
fn clone(&self) -> BucketInserts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for BucketInserts
impl Debug for BucketInserts
§impl PartialEq for BucketInserts
impl PartialEq for BucketInserts
impl Copy for BucketInserts
impl Eq for BucketInserts
impl StructuralPartialEq for BucketInserts
Auto Trait Implementations§
impl Freeze for BucketInserts
impl RefUnwindSafe for BucketInserts
impl Send for BucketInserts
impl Sync for BucketInserts
impl Unpin for BucketInserts
impl UnwindSafe for BucketInserts
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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: 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)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more