Struct doapi::request::DnsRecord [] [src]

pub struct DnsRecord {
    pub rec_type: Option<String>,
    pub name: Option<String>,
    pub priority: Option<u64>,
    pub port: Option<u64>,
    pub data: Option<String>,
    pub weight: Option<u64>,
}

A struct for creating a DNS Record

Fields

rec_type

The type of record (A, AAAA, MX, NS, etc.)

NOTE: You can use the DnsRecType's implementation of std::fmt::Display to get a String

name

The name of the record (Required for: A, AAAA, CNAME, TXT, and SRV)

priority

The priority of the record (Required for: MX and SRV)

port

The port of the record (Required for: SRV)

data

Various data used for record (Required for: A, AAAA, CNAME, MX, TXT, SRV, NS)

weight

The weight of the record (Required for: SRV)

Trait Implementations

impl Display for DnsRecord

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Serialize for DnsRecord

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer