Enum bip_dht::message::response::ResponseType
[−]
[src]
pub enum ResponseType<'a> { Ping(PingResponse<'a>), FindNode(FindNodeResponse<'a>), GetPeers(GetPeersResponse<'a>), AnnouncePeer(AnnouncePeerResponse<'a>), }
Variants
Ping(PingResponse<'a>)
FindNode(FindNodeResponse<'a>)
GetPeers(GetPeersResponse<'a>)
AnnouncePeer(AnnouncePeerResponse<'a>)
Methods
impl<'a> ResponseType<'a>
[src]
fn from_parts(
root: &'a Dictionary<'a, Bencode<'a>>,
trans_id: &'a [u8],
rsp_type: ExpectedResponse
) -> Result<ResponseType<'a>, DhtError>
root: &'a Dictionary<'a, Bencode<'a>>,
trans_id: &'a [u8],
rsp_type: ExpectedResponse
) -> Result<ResponseType<'a>, DhtError>
Trait Implementations
impl<'a> Copy for ResponseType<'a>
[src]
impl<'a> Clone for ResponseType<'a>
[src]
fn clone(&self) -> ResponseType<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a> PartialEq for ResponseType<'a>
[src]
fn eq(&self, __arg_0: &ResponseType<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ResponseType<'a>) -> bool
This method tests for !=
.
impl<'a> Eq for ResponseType<'a>
[src]
impl<'a> Hash for ResponseType<'a>
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more