pub enum DHTResponse {
Nodes {
nodes: Vec<SerializableDHTNode>,
},
Value {
record: Record,
},
Stored {
success: bool,
},
Pong {
responder: PeerId,
},
Error {
message: String,
},
}
Expand description
DHT response types
Variants§
Nodes
Response to FindNode query
Fields
§
nodes: Vec<SerializableDHTNode>
List of nodes near the requested key
Value
Response to FindValue query
Stored
Response to Store query
Pong
Response to Ping query
Error
Error response
Trait Implementations§
Source§impl Clone for DHTResponse
impl Clone for DHTResponse
Source§fn clone(&self) -> DHTResponse
fn clone(&self) -> DHTResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DHTResponse
impl Debug for DHTResponse
Source§impl<'de> Deserialize<'de> for DHTResponse
impl<'de> Deserialize<'de> for DHTResponse
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
Auto Trait Implementations§
impl Freeze for DHTResponse
impl RefUnwindSafe for DHTResponse
impl Send for DHTResponse
impl Sync for DHTResponse
impl Unpin for DHTResponse
impl UnwindSafe for DHTResponse
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