pub enum KadResponseMsg {
Pong,
FindNode {
closer_peers: Vec<KadPeer, Global>,
},
GetProviders {
closer_peers: Vec<KadPeer, Global>,
provider_peers: Vec<KadPeer, Global>,
},
GetValue {
record: Option<Record>,
closer_peers: Vec<KadPeer, Global>,
},
PutValue {
key: Key,
value: Vec<u8, Global>,
},
}
Expand description
Response that we can send to a peer or that we received from a peer.
Variants
Pong
Ping response.
FindNode
Response to a FindNode
.
GetProviders
Fields
Response to a GetProviders
.
GetValue
Fields
Response to a GetValue
.
PutValue
Response to a PutValue
.
Trait Implementations
sourceimpl Clone for KadResponseMsg
impl Clone for KadResponseMsg
sourcepub fn clone(&self) -> KadResponseMsg
pub fn clone(&self) -> KadResponseMsg
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 more
sourceimpl Debug for KadResponseMsg
impl Debug for KadResponseMsg
sourceimpl PartialEq<KadResponseMsg> for KadResponseMsg
impl PartialEq<KadResponseMsg> for KadResponseMsg
sourcepub fn eq(&self, other: &KadResponseMsg) -> bool
pub fn eq(&self, other: &KadResponseMsg) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &KadResponseMsg) -> bool
pub fn ne(&self, other: &KadResponseMsg) -> bool
This method tests for !=
.
impl Eq for KadResponseMsg
impl StructuralEq for KadResponseMsg
impl StructuralPartialEq for KadResponseMsg
Auto Trait Implementations
impl RefUnwindSafe for KadResponseMsg
impl Send for KadResponseMsg
impl Sync for KadResponseMsg
impl Unpin for KadResponseMsg
impl UnwindSafe for KadResponseMsg
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more