pub enum KadRequestMsg {
Ping,
FindNode {
key: PeerId,
},
GetProviders {
key: Multihash,
},
AddProvider {
key: Multihash,
provider_peer: KadPeer,
},
}Request that we can send to a peer or that we received from a peer.
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.
Fields of FindNode
Same as FindNode, but should also return the entries of the local providers list for
this key.
Fields of GetProviders
Identifier being searched.
Indicates that this list of providers is known for this key.
Fields of AddProvider
Key for which we should add providers.
Known provider for this key.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=.
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static