[−][src]Struct resolve::message::Message
Represents a DNS message.
Fields
header: Header
Describes the content of the remainder of the message.
question: Vec<Question>
Carries the question of query type messages.
answer: Vec<Resource<'a>>
Resource records that answer the query
Resource records that point to an authoritative name server
additional: Vec<Resource<'a>>
Resource records that relate to the query, but are not strictly answers for the question.
Methods
impl<'a> Message<'a>[src]
impl<'a> Message<'a>pub fn new() -> Message<'a>[src]
pub fn new() -> Message<'a>Constructs a new Message with a random id value.
pub fn with_id(id: u16) -> Message<'a>[src]
pub fn with_id(id: u16) -> Message<'a>Constructs a new Message with the given id value.
pub fn decode(data: &[u8]) -> Result<Message, DecodeError>[src]
pub fn decode(data: &[u8]) -> Result<Message, DecodeError>Decodes a message from a series of bytes.
pub fn encode<'buf>(
&self,
buf: &'buf mut [u8]
) -> Result<&'buf [u8], EncodeError>[src]
pub fn encode<'buf>(
&self,
buf: &'buf mut [u8]
) -> Result<&'buf [u8], EncodeError>Encodes a message to a series of bytes. On success, returns a subslice of the given buffer containing only the encoded message bytes.
pub fn get_error(&self) -> Result<(), DnsError>[src]
pub fn get_error(&self) -> Result<(), DnsError>Returns a DnsError if the message response code is an error.
ⓘImportant traits for RecordIter<'a>pub fn records(&self) -> RecordIter[src]
pub fn records(&self) -> RecordIterReturns an iterator over the records in this message.
ⓘImportant traits for RecordIntoIter<'a>pub fn into_records(self) -> RecordIntoIter<'a>[src]
pub fn into_records(self) -> RecordIntoIter<'a>Consumes the message and returns an iterator over its records.
Trait Implementations
impl<'a> Clone for Message<'a>[src]
impl<'a> Clone for Message<'a>fn clone(&self) -> Message<'a>[src]
fn clone(&self) -> Message<'a>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<'a> Eq for Message<'a>[src]
impl<'a> Eq for Message<'a>impl<'a> Default for Message<'a>[src]
impl<'a> Default for Message<'a>impl<'a> PartialEq<Message<'a>> for Message<'a>[src]
impl<'a> PartialEq<Message<'a>> for Message<'a>fn eq(&self, other: &Message<'a>) -> bool[src]
fn eq(&self, other: &Message<'a>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Message<'a>) -> bool[src]
fn ne(&self, other: &Message<'a>) -> boolThis method tests for !=.
impl<'a> Debug for Message<'a>[src]
impl<'a> Debug for Message<'a>Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more