Enum libp2p::kad::protocol::KadResponseMsg
source · 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>,
},
}
Expand description
Response that we can send to a peer or that we received from a peer.
Variants§
Pong
Ping response.
FindNode
Response to a FindNode
.
GetProviders
Fields
Response to a GetProviders
.
GetValue
Fields
Response to a GetValue
.
PutValue
Response to a PutValue
.
Trait Implementations§
source§impl Clone for KadResponseMsg
impl Clone for KadResponseMsg
source§fn clone(&self) -> KadResponseMsg
fn clone(&self) -> KadResponseMsg
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for KadResponseMsg
impl Debug for KadResponseMsg
source§impl PartialEq<KadResponseMsg> for KadResponseMsg
impl PartialEq<KadResponseMsg> for KadResponseMsg
source§fn eq(&self, other: &KadResponseMsg) -> bool
fn eq(&self, other: &KadResponseMsg) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for KadResponseMsg
impl StructuralEq for KadResponseMsg
impl StructuralPartialEq for KadResponseMsg
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more