[][src]Struct libp2p::kad::kbucket::EntryInKbucketConn

pub struct EntryInKbucketConn<'a, TPeerId, TVal> where
    TPeerId: 'a,
    TVal: 'a, 
{ /* fields omitted */ }

Represents an entry in a k-bucket.

Methods

impl<'a, TPeerId, TVal> EntryInKbucketConn<'a, TPeerId, TVal> where
    TPeerId: KBucketsPeerId<TPeerId> + Clone
[src]

pub fn value(&mut self) -> &mut TVal[src]

Returns the value associated to the entry in the bucket.

pub fn set_disconnected(self) -> SetDisconnectedOutcome<'a, TPeerId, TVal>[src]

Reports that we are now disconnected from the given node.

This moves the node down in its bucket. There are two possible outcomes:

  • Either we had a pending node which replaces the current node. Replaced is returned.
  • Or we had no pending node, and the current node is kept. Kept is returned.

Auto Trait Implementations

impl<'a, TPeerId, TVal> Send for EntryInKbucketConn<'a, TPeerId, TVal> where
    TPeerId: Send + Sync,
    TVal: Send

impl<'a, TPeerId, TVal> Sync for EntryInKbucketConn<'a, TPeerId, TVal> where
    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]

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

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.