Enum libp2p_kad::protocol::KadRequestMsg
source · [−]pub enum KadRequestMsg {
Ping,
FindNode {
key: Vec<u8>,
},
GetProviders {
key: Key,
},
AddProvider {
key: Key,
provider: KadPeer,
},
GetValue {
key: Key,
},
PutValue {
record: Record,
},
}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
Fields
key: KeyIdentifier being searched.
Same as FindNode, but should also return the entries of the local providers list for
this key.
AddProvider
Indicates that this list of providers is known for this key.
GetValue
Fields
key: KeyThe key we are searching for.
Request to get a value from the dht records.
PutValue
Fields
record: RecordRequest to put a value into the dht records.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for KadRequestMsg
impl Send for KadRequestMsg
impl Sync for KadRequestMsg
impl Unpin for KadRequestMsg
impl UnwindSafe for KadRequestMsg
Blanket Implementations
Mutably borrows from an owned value. Read more