[−][src]Enum libp2p::kad::handler::KademliaHandlerIn
Event to send to the handler.
Variants
FindNodeReq
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 FindNodeReq
key: PeerId
Identifier of the node.
user_data: TUserData
Custom user data. Passed back in the out event when the results arrive.
FindNodeRes
Response to a FindNodeReq
.
Fields of FindNodeRes
closer_peers: Vec<KadPeer>
Results of the request.
request_id: KademliaRequestId
Identifier of the request that was made by the remote.
It is a logic error to use an id of the handler of a different node.
GetProvidersReq
Same as FindNodeReq
, but should also return the entries of the local providers list for
this key.
Fields of GetProvidersReq
key: Multihash
Identifier being searched.
user_data: TUserData
Custom user data. Passed back in the out event when the results arrive.
GetProvidersRes
Response to a GetProvidersReq
.
Fields of GetProvidersRes
closer_peers: Vec<KadPeer>
Nodes closest to the key.
provider_peers: Vec<KadPeer>
Known providers for this key.
request_id: KademliaRequestId
Identifier of the request that was made by the remote.
It is a logic error to use an id of the handler of a different node.
AddProvider
Indicates that this provider is known for this key.
The API of the handler doesn't expose any event that allows you to know whether this succeeded.
Fields of AddProvider
Auto Trait Implementations
impl<TUserData> Send for KademliaHandlerIn<TUserData> where
TUserData: Send,
TUserData: Send,
impl<TUserData> Sync for KademliaHandlerIn<TUserData> where
TUserData: Sync,
TUserData: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Erased for T
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,