Enum libp2p_kad::protocol::KadResponseMsg
source · 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>,
},
}
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
Response to a GetProviders
.
Fields
GetValue
Response to a GetValue
.
Fields
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 for KadResponseMsg
impl PartialEq 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 StructuralPartialEq for KadResponseMsg
Auto Trait Implementations§
impl !Freeze for KadResponseMsg
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)