Struct tetsy_libp2p_kad::GetRecordOk[][src]

pub struct GetRecordOk {
    pub records: Vec<PeerRecord>,
    pub cache_candidates: BTreeMap<Distance, PeerId>,
}

The successful result of Kademlia::get_record.

Fields

records: Vec<PeerRecord>

The records found, including the peer that returned them.

cache_candidates: BTreeMap<Distance, PeerId>

If caching is enabled, these are the peers closest to the record key (not the local node) that were queried but did not return the record, sorted by distance to the record key from closest to farthest. How many of these are tracked is configured by KademliaConfig::set_caching. If the lookup used a quorum of 1, these peers will be sent the record as a means of caching. If the lookup used a quorum > 1, you may wish to use these candidates with Kademlia::put_record_to after selecting one of the returned records.

Trait Implementations

impl Clone for GetRecordOk[src]

impl Debug for GetRecordOk[src]

Auto Trait Implementations

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

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>,