Enum libp2p::kad::protocol::KadRequestMsg
source · pub enum KadRequestMsg {
Ping,
FindNode {
key: Vec<u8, Global>,
},
GetProviders {
key: Key,
},
AddProvider {
key: Key,
provider: KadPeer,
},
GetValue {
key: Key,
},
PutValue {
record: Record,
},
}
Available on crate feature
kad
only.Expand description
Request that we can send to a peer or that we received from a peer.
Variants§
Ping
Ping request.
FindNode
Request for the list of nodes whose IDs are the closest to key
. The number of nodes
returned is not specified, but should be around 20.
GetProviders
Same as FindNode
, but should also return the entries of the local providers list for
this key.
AddProvider
Fields
Indicates that this list of providers is known for this key.
GetValue
Request to get a value from the dht records.
PutValue
Request to put a value into the dht records.
Trait Implementations§
source§impl Clone for KadRequestMsg
impl Clone for KadRequestMsg
source§fn clone(&self) -> KadRequestMsg
fn clone(&self) -> KadRequestMsg
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 KadRequestMsg
impl Debug for KadRequestMsg
source§impl PartialEq<KadRequestMsg> for KadRequestMsg
impl PartialEq<KadRequestMsg> for KadRequestMsg
source§fn eq(&self, other: &KadRequestMsg) -> bool
fn eq(&self, other: &KadRequestMsg) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.