pub struct DnsResponsePayload {
pub name: String,
pub dtype: QType,
pub class: QClass,
pub ttl: i32,
pub rdlength: u16,
pub rdata: DnsRdata,
}Expand description
A response section
Fields§
§name: String§dtype: QTypeTwo octets containing one of th type codes.
class: QClassTwo octets which specify the class of the data in the RDATA field
ttl: i32specifies the time interval that the resource record may be cached before the source of the information should again be consulted
rdlength: u16specifies the length in octets of the RDATA field
rdata: DnsRdataa variable length string of octets that describes the resource
Implementations§
Source§impl DnsResponsePayload
impl DnsResponsePayload
Sourcepub fn get_rdata(&self) -> &DnsRdata
pub fn get_rdata(&self) -> &DnsRdata
Returns the variable length string of octets that describes the resource as a reference.
Sourcepub fn borrow_rdata(self) -> DnsRdata
pub fn borrow_rdata(self) -> DnsRdata
Returns the variable length string of octets that describes the resource by consuming the instance.
Sourcepub fn get_full_domain_name_with_idn_decode(&self) -> CDnsResult<String>
pub fn get_full_domain_name_with_idn_decode(&self) -> CDnsResult<String>
Attemps to decode the punycode into the UTF-8 domain name.
§Returns
An error Result::Err is returned if the received data is not possible to decode.
Sourcepub fn get_full_domain_name(&self) -> &str
pub fn get_full_domain_name(&self) -> &str
Returns the raw domain name as it was recevied.
pub fn get_domain_name_iter(&self) -> Split<'_, &str>
Sourcepub fn get_domain_name_iter_with_idn_decode(
&self,
) -> CDnsResult<IntoIter<String>>
pub fn get_domain_name_iter_with_idn_decode( &self, ) -> CDnsResult<IntoIter<String>>
Attemps to obtain an iterator of a separated domain
name also decoding the punycode into the UTF-8 domain name.
§Returns
An error Result::Err is returned if the received data is not possible to decode.
Trait Implementations§
Source§impl Clone for DnsResponsePayload
impl Clone for DnsResponsePayload
Source§fn clone(&self) -> DnsResponsePayload
fn clone(&self) -> DnsResponsePayload
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DnsResponsePayload
impl Debug for DnsResponsePayload
Source§impl Default for DnsResponsePayload
impl Default for DnsResponsePayload
Source§fn default() -> DnsResponsePayload
fn default() -> DnsResponsePayload
Source§impl Display for DnsResponsePayload
Available on crate feature enable_IDN_support only.
impl Display for DnsResponsePayload
enable_IDN_support only.