Enum libp2p_kad::protocol::KadRequestMsg
source · pub enum KadRequestMsg {
Ping,
FindNode {
key: PeerId,
},
GetProviders {
key: Multihash,
},
AddProvider {
key: Multihash,
provider_peer: KadPeer,
},
}
Expand description
Request that we can send to a peer or that we received from a peer.
Variants
Ping
Ping request.
FindNode
Fields
key: PeerId
Identifier of the node.
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: Multihash
Identifier being searched.
Same as FindNode
, but should also return the entries of the local providers list for
this key.
AddProvider
Fields
key: Multihash
Key for which we should add providers.
provider_peer: KadPeer
Known provider for this key.
Indicates that this list of providers is known for this key.
Trait Implementations
sourceimpl Clone for KadRequestMsg
impl Clone for KadRequestMsg
sourcefn clone(&self) -> KadRequestMsg
fn clone(&self) -> KadRequestMsg
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for KadRequestMsg
impl Debug for KadRequestMsg
sourceimpl PartialEq<KadRequestMsg> for KadRequestMsg
impl PartialEq<KadRequestMsg> for KadRequestMsg
sourcefn eq(&self, other: &KadRequestMsg) -> bool
fn eq(&self, other: &KadRequestMsg) -> bool
impl Eq for KadRequestMsg
impl StructuralEq for KadRequestMsg
impl StructuralPartialEq for KadRequestMsg
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more