pub enum InsertResult<TNodeId> {
Inserted,
Pending {
disconnected: Key<TNodeId>,
},
FailedFilter,
TooManyIncoming,
Full,
NodeExists,
}
Expand description
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
disconnected: Key<TNodeId>
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 a connected status.
FailedFilter
The attempted entry failed to pass the filter.
TooManyIncoming
There were too many incoming nodes for this bucket.
Full
The entry was not inserted because the relevant bucket is full.
NodeExists
The entry already exists.
Trait Implementations§
Source§impl<TNodeId: Clone> Clone for InsertResult<TNodeId>
impl<TNodeId: Clone> Clone for InsertResult<TNodeId>
Source§fn clone(&self) -> InsertResult<TNodeId>
fn clone(&self) -> InsertResult<TNodeId>
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<TNodeId: Debug> Debug for InsertResult<TNodeId>
impl<TNodeId: Debug> Debug for InsertResult<TNodeId>
Source§impl<TNodeId: PartialEq> PartialEq for InsertResult<TNodeId>
impl<TNodeId: PartialEq> PartialEq for InsertResult<TNodeId>
impl<TNodeId: Eq> Eq for InsertResult<TNodeId>
impl<TNodeId> StructuralPartialEq for InsertResult<TNodeId>
Auto Trait Implementations§
impl<TNodeId> Freeze for InsertResult<TNodeId>where
TNodeId: Freeze,
impl<TNodeId> RefUnwindSafe for InsertResult<TNodeId>where
TNodeId: RefUnwindSafe,
impl<TNodeId> Send for InsertResult<TNodeId>where
TNodeId: Send,
impl<TNodeId> Sync for InsertResult<TNodeId>where
TNodeId: Sync,
impl<TNodeId> Unpin for InsertResult<TNodeId>where
TNodeId: Unpin,
impl<TNodeId> UnwindSafe for InsertResult<TNodeId>where
TNodeId: UnwindSafe,
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.