pub enum DhtRequest {
FindNode {
node_id: String,
target_id: String,
},
FindProviders {
node_id: String,
content_key: String,
},
AddProvider {
node_id: String,
content_key: String,
provider: Provider,
},
Ping {
node_id: String,
},
}Expand description
A DHT request frame, dispatched on type.
Variants§
FindNode
Find the nodes closest to target_id.
Fields
FindProviders
Find providers for a content key (plus closer nodes to continue the walk).
Fields
AddProvider
Announce that a provider holds a content key.
Fields
Ping
Liveness probe.
Trait Implementations§
Source§impl Clone for DhtRequest
impl Clone for DhtRequest
Source§fn clone(&self) -> DhtRequest
fn clone(&self) -> DhtRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DhtRequest
impl Debug for DhtRequest
Source§impl<'de> Deserialize<'de> for DhtRequest
impl<'de> Deserialize<'de> for DhtRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DhtRequest
Source§impl PartialEq for DhtRequest
impl PartialEq for DhtRequest
Source§impl Serialize for DhtRequest
impl Serialize for DhtRequest
impl StructuralPartialEq for DhtRequest
Auto Trait Implementations§
impl Freeze for DhtRequest
impl RefUnwindSafe for DhtRequest
impl Send for DhtRequest
impl Sync for DhtRequest
impl Unpin for DhtRequest
impl UnsafeUnpin for DhtRequest
impl UnwindSafe for DhtRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more