Struct bip_dht::message::error::ErrorMessage
[−]
[src]
pub struct ErrorMessage<'a> { /* fields omitted */ }
Methods
impl<'a> ErrorMessage<'a>
[src]
fn new(
trans_id: Vec<u8>,
code: ErrorCode,
message: String
) -> ErrorMessage<'static>
trans_id: Vec<u8>,
code: ErrorCode,
message: String
) -> ErrorMessage<'static>
TODO: Figure out a way to make the error message non static while still providing a clean
fn from_parts(
root: &Dictionary<'a, Bencode<'a>>,
trans_id: &'a [u8]
) -> Result<ErrorMessage<'a>, DhtError>
root: &Dictionary<'a, Bencode<'a>>,
trans_id: &'a [u8]
) -> Result<ErrorMessage<'a>, DhtError>
fn transaction_id<'b>(&'b self) -> &'b [u8]
fn error_code(&self) -> ErrorCode
fn error_message<'b>(&'b self) -> &'b str
fn encode(&self) -> Vec<u8>
Trait Implementations
impl<'a> Clone for ErrorMessage<'a>
[src]
fn clone(&self) -> ErrorMessage<'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 ErrorMessage<'a>
[src]
fn eq(&self, __arg_0: &ErrorMessage<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ErrorMessage<'a>) -> bool
This method tests for !=
.
impl<'a> Eq for ErrorMessage<'a>
[src]
impl<'a> Hash for ErrorMessage<'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