[][src]Enum libp2p_kad::protocol::KadResponseMsg

pub enum KadResponseMsg {
    Pong,
    FindNode {
        closer_peers: Vec<KadPeer>,
    },
    GetProviders {
        closer_peers: Vec<KadPeer>,
        provider_peers: Vec<KadPeer>,
    },
    GetValue {
        record: Option<Record>,
        closer_peers: Vec<KadPeer>,
    },
    PutValue {
        key: Key,
        value: Vec<u8>,
    },
}

Response that we can send to a peer or that we received from a peer.

Variants

Pong

Ping response.

FindNode

Response to a FindNode.

Fields of FindNode

closer_peers: Vec<KadPeer>

Results of the request.

GetProviders

Response to a GetProviders.

Fields of GetProviders

closer_peers: Vec<KadPeer>

Nodes closest to the key.

provider_peers: Vec<KadPeer>

Known providers for this key.

GetValue

Response to a GetValue.

Fields of GetValue

record: Option<Record>

Result that might have been found

closer_peers: Vec<KadPeer>

Nodes closest to the key

PutValue

Response to a PutValue.

Fields of PutValue

key: Key

The key of the record.

value: Vec<u8>

Value of the record.

Trait Implementations

impl Clone for KadResponseMsg[src]

impl Debug for KadResponseMsg[src]

impl Eq for KadResponseMsg[src]

impl PartialEq<KadResponseMsg> for KadResponseMsg[src]

impl StructuralEq for KadResponseMsg[src]

impl StructuralPartialEq for KadResponseMsg[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>,