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

#[must_use]pub enum InsertResult<TKey> {
    Inserted,
    Pending {
        disconnected: TKey,
    },
    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: TKey

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<TKey> Clone for InsertResult<TKey> where
    TKey: Clone
[src]

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

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

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

impl<TKey> StructuralEq for InsertResult<TKey>[src]

impl<TKey> StructuralPartialEq for InsertResult<TKey>[src]

Auto Trait Implementations

impl<TKey> RefUnwindSafe for InsertResult<TKey> where
    TKey: RefUnwindSafe

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

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

impl<TKey> Unpin for InsertResult<TKey> where
    TKey: Unpin

impl<TKey> UnwindSafe for InsertResult<TKey> where
    TKey: UnwindSafe

Blanket Implementations

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

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

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

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

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

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

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]