[−][src]Enum libp2p::kad::kbucket::Entry
Represents an entry or a potential entry in the k-buckets.
Variants
InKbucketConnected(EntryInKbucketConn<'a, TPeerId, TVal>)
Entry in a k-bucket that we're connected to.
InKbucketConnectedPending(EntryInKbucketConnPending<'a, TPeerId, TVal>)
Entry pending waiting for a free slot to enter a k-bucket. We're connected to it.
InKbucketDisconnected(EntryInKbucketDisc<'a, TPeerId, TVal>)
Entry in a k-bucket but that we're not connected to.
InKbucketDisconnectedPending(EntryInKbucketDiscPending<'a, TPeerId, TVal>)
Entry pending waiting for a free slot to enter a k-bucket. We're not connected to it.
NotInKbucket(EntryNotInKbucket<'a, TPeerId, TVal>)
Entry is not present in any k-bucket.
SelfEntry
Entry is the local peer ID.
Methods
impl<'a, TPeerId, TVal> Entry<'a, TPeerId, TVal> where
TPeerId: KBucketsPeerId<TPeerId> + Clone,
[src]
TPeerId: KBucketsPeerId<TPeerId> + Clone,
pub fn value(&mut self) -> Option<&mut TVal>
[src]
Returns the value associated to the entry in the bucket, including if the node is pending.
pub fn value_not_pending(&mut self) -> Option<&mut TVal>
[src]
Returns the value associated to the entry in the bucket.
Auto Trait Implementations
impl<'a, TPeerId, TVal> Send for Entry<'a, TPeerId, TVal> where
TPeerId: Send + Sync,
TVal: Send,
TPeerId: Send + Sync,
TVal: Send,
impl<'a, TPeerId, TVal> Sync for Entry<'a, TPeerId, TVal> where
TPeerId: Sync,
TVal: Sync,
TPeerId: Sync,
TVal: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Erased for T
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,