pub enum RecordData {
Show 19 variants
A {
address: String,
},
AAAA {
address: String,
},
CNAME {
target: String,
},
MX {
preference: u16,
exchange: String,
},
NS {
nameserver: String,
},
TXT {
text: String,
strings: Vec<String>,
},
SOA {
mname: String,
rname: String,
serial: u32,
refresh: u32,
retry: u32,
expire: u32,
minimum: u32,
},
PTR {
target: String,
},
SRV {
priority: u16,
weight: u16,
port: u16,
target: String,
},
CAA {
flags: u8,
tag: String,
value: String,
},
DNSKEY {
flags: u16,
protocol: u8,
algorithm: u8,
public_key: String,
},
DS {
key_tag: u16,
algorithm: u8,
digest_type: u8,
digest: String,
},
CDS {
key_tag: u16,
algorithm: u8,
digest_type: u8,
digest: String,
},
CDNSKEY {
flags: u16,
protocol: u8,
algorithm: u8,
public_key: String,
},
TLSA {
cert_usage: u8,
selector: u8,
matching: u8,
cert_data: String,
},
SSHFP {
algorithm: u8,
fingerprint_type: u8,
fingerprint: String,
},
NAPTR {
order: u16,
preference: u16,
flags: String,
services: String,
regexp: String,
replacement: String,
},
HTTPS {
priority: u16,
target: String,
params: Vec<SvcParam>,
},
SVCB {
priority: u16,
target: String,
params: Vec<SvcParam>,
},
}Variants§
A
AAAA
CNAME
MX
NS
TXT
A TXT record: one or more character-strings (RFC 1035 §3.3.14).
Build one with RecordData::txt, which keeps the two fields in
step.
Fields
text: StringThe character-strings joined with nothing between them — how SPF (RFC 7208 §3.3), DMARC and verification tokens read a TXT record.
strings: Vec<String>The character-strings as the server sent them: where a record
splits is part of its data, so ["ab", "c"] and ["a", "bc"]
are different records with the same text. Empty only for a
record built without them (data serialized before this field),
which then reads as the one string text.
SOA
PTR
SRV
CAA
DNSKEY
DS
CDS
Child DS (RFC 7344): the DS record a child zone asks its parent to
publish. Same fields as RecordData::DS; algorithm 0 is the
RFC 8078 delete request.
CDNSKEY
Child DNSKEY (RFC 7344). Same fields as RecordData::DNSKEY;
algorithm 0 is the RFC 8078 delete request.
TLSA
Fields
SSHFP
NAPTR
HTTPS
HTTPS service binding (RFC 9460). priority 0 is AliasMode (target
is an alias, no params); anything else is ServiceMode.
Fields
SVCB
General service binding (RFC 9460), same shape as
RecordData::HTTPS.
Implementations§
Trait Implementations§
Source§impl Clone for RecordData
impl Clone for RecordData
Source§impl Debug for RecordData
impl Debug for RecordData
Source§impl<'de> Deserialize<'de> for RecordData
impl<'de> Deserialize<'de> for RecordData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for RecordData
impl Display for RecordData
impl Eq for RecordData
Source§impl PartialEq for RecordData
impl PartialEq for RecordData
Source§impl Serialize for RecordData
impl Serialize for RecordData
impl StructuralPartialEq for RecordData
Auto Trait Implementations§
impl Freeze for RecordData
impl RefUnwindSafe for RecordData
impl Send for RecordData
impl Sync for RecordData
impl Unpin for RecordData
impl UnsafeUnpin for RecordData
impl UnwindSafe for RecordData
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more