[][src]Enum libp2p::kad::kbucket::InsertResult

#[must_use]
pub enum InsertResult<TPeerId> { Inserted, Pending { disconnected: Key<TPeerId>, }, Full, }

The result of inserting an entry into a bucket.

Variants

Inserted

The entry has been successfully inserted.

Pending

The entry is pending insertion because the relevant bucket is currently full. The entry is inserted after a timeout elapsed, if the status of the least-recently connected (and currently disconnected) node in the bucket is not updated before the timeout expires.

Fields of Pending

disconnected: Key<TPeerId>

The key of the least-recently connected entry that is currently considered disconnected and whose corresponding peer should be checked for connectivity in order to prevent it from being evicted. If connectivity to the peer is re-established, the corresponding entry should be updated with [NodeStatus::Connected].

Full

The entry was not inserted because the relevant bucket is full.

Trait Implementations

impl<TPeerId> Eq for InsertResult<TPeerId> where
    TPeerId: Eq
[src]

impl<TPeerId> Debug for InsertResult<TPeerId> where
    TPeerId: Debug
[src]

impl<TPeerId> Clone for InsertResult<TPeerId> where
    TPeerId: Clone
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<TPeerId> PartialEq<InsertResult<TPeerId>> for InsertResult<TPeerId> where
    TPeerId: PartialEq<TPeerId>, 
[src]

Auto Trait Implementations

impl<TPeerId> Send for InsertResult<TPeerId> where
    TPeerId: Send

impl<TPeerId> Sync for InsertResult<TPeerId> where
    TPeerId: Sync

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T> Erased for T