[][src]Enum rusty_dns::dns_packet::dns_resource_record::DnsResourceRecordData

pub enum DnsResourceRecordData {
    A(Ipv4Addr),
    NS(String),
    MD(String),
    MF(String),
    CNAME(String),
    SOA((String, String, u32, u32, u32, u32, u32)),
    MB(String),
    MG(String),
    MR(String),
    NULL(Vec<u8>),
    WKS((Ipv4Addr, u8, Vec<u8>)),
    PTR(String),
    HINFO((String, String)),
    MINFO((String, String)),
    MX((u16, String)),
    TXT(String),
    AAAA(Ipv6Addr),
    SRV((u16, u16, u16, String)),
}

Represents the data stored in DNS resource records

Variants

An IPv4 host address.

NS(String)

An authoritative name server.

MD(String)

A mail destination (Obsolete - replaced by MX).

MF(String)

A mail forwarder (Obsolete - replaced by MX).

CNAME(String)

The canonical name for an alias.

Marks the start of a zone of authority.

MB(String)

A mailbox domain name.

MG(String)

A mail group member.

MR(String)

A mail rename domain name.

NULL(Vec<u8>)

An experimental RR containing any possible data.

A well known service description.

PTR(String)

A domain name pointer.

Host information.

Mailbox or mail list information.

Mail exchange.

TXT(String)

Text strings.

AAAA(Ipv6Addr)

An IPv6 host address.

Specifies location of a service for a specific protocol.

Implementations

impl DnsResourceRecordData[src]

pub fn parse(
    rrtype: u16,
    buf: &Vec<u8>,
    start: usize,
    rdlength: u16
) -> Result<DnsResourceRecordData, String>
[src]

Parse the data for a resource record from buf

pub fn serialize(
    &self,
    buf: &mut Vec<u8>,
    domain_name_offsets: &mut HashMap<String, u16>
) -> Result<(), String>
[src]

Serialize the resource record data into a DNS protocol network ready format

Trait Implementations

impl Debug for DnsResourceRecordData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,