Enum libp2p::kad::protocol::KadResponseMsg[][src]

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

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

Results of the request.

GetProviders

Response to a GetProviders.

Fields of GetProviders

closer_peers: Vec<KadPeer, Global>

Nodes closest to the key.

provider_peers: Vec<KadPeer, Global>

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

Nodes closest to the key

PutValue

Response to a PutValue.

Fields of PutValue

key: Key

The key of the record.

value: Vec<u8, Global>

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

impl RefUnwindSafe for KadResponseMsg

impl Send for KadResponseMsg

impl Sync for KadResponseMsg

impl Unpin for KadResponseMsg

impl UnwindSafe for KadResponseMsg

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[src]

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>, 
[src]