#[non_exhaustive]pub enum RecordData<'a, N> {
Show 21 variants
A(A),
Ns(Ns<N>),
CName(CName<N>),
Soa(Soa<N>),
Ptr(Ptr<N>),
HInfo(HInfo<'a>),
Mx(Mx<N>),
Txt(&'a Txt),
Rp(Rp<N>),
Srv(&'a Srv),
Aaaa(Aaaa),
DName(&'a DName),
Opt(&'a Opt),
Ds(&'a Ds),
Rrsig(Rrsig<'a>),
Nsec(Nsec<'a>),
DNSKey(&'a DNSKey),
Nsec3(Nsec3<'a>),
Nsec3Param(&'a Nsec3Param),
ZoneMD(&'a ZoneMD),
Unknown(RType, &'a UnknownRecordData),
}unstable-new only.Expand description
DNS record data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
A(A)
The IPv4 address of a host responsible for this domain.
Ns(Ns<N>)
The authoritative name server for this domain.
CName(CName<N>)
The canonical name for this domain.
Soa(Soa<N>)
The start of a zone of authority.
Ptr(Ptr<N>)
A pointer to another domain name.
HInfo(HInfo<'a>)
Information about the host computer.
Mx(Mx<N>)
A host that can exchange mail for this domain.
Txt(&'a Txt)
Free-form text strings about this domain.
Rp(Rp<N>)
Identification of the person/party responsible for this domain.
Srv(&'a Srv)
The locations of services associated with this domain.
Aaaa(Aaaa)
The IPv6 address of a host responsible for this domain.
DName(&'a DName)
Redirection for the descendants of this domain.
Opt(&'a Opt)
Extended DNS options.
Ds(&'a Ds)
The signing key of a delegated zone.
Rrsig(Rrsig<'a>)
A cryptographic signature on a DNS record set.
Nsec(Nsec<'a>)
An indication of the non-existence of a set of DNS records (version 1).
DNSKey(&'a DNSKey)
A cryptographic key for DNS security.
Nsec3(Nsec3<'a>)
An indication of the non-existence of a set of DNS records (version 3).
Nsec3Param(&'a Nsec3Param)
Parameters for computing Nsec3 records.
ZoneMD(&'a ZoneMD)
A message digest of the enclosing zone.
Unknown(RType, &'a UnknownRecordData)
Data for an unknown DNS record type.
Implementations§
Source§impl<'a, N> RecordData<'a, N>
impl<'a, N> RecordData<'a, N>
Sourcepub fn map_names<R, F: FnMut(N) -> R>(self, f: F) -> RecordData<'a, R>
pub fn map_names<R, F: FnMut(N) -> R>(self, f: F) -> RecordData<'a, R>
Map the domain names within to another type.
Sourcepub fn map_names_by_ref<'r, R, F: FnMut(&'r N) -> R>(
&'r self,
f: F,
) -> RecordData<'r, R>
pub fn map_names_by_ref<'r, R, F: FnMut(&'r N) -> R>( &'r self, f: F, ) -> RecordData<'r, R>
Map references to the domain names within to another type.
Sourcepub fn clone_to_bump<'r>(&self, bump: &'r Bump) -> RecordData<'r, N>where
N: Clone,
Available on crate feature bumpalo only.
pub fn clone_to_bump<'r>(&self, bump: &'r Bump) -> RecordData<'r, N>where
N: Clone,
bumpalo only.Copy referenced data into the given Bump allocator.
Trait Implementations§
Source§impl<N: BuildBytes> BuildBytes for RecordData<'_, N>
impl<N: BuildBytes> BuildBytes for RecordData<'_, N>
Source§fn build_bytes<'b>(
&self,
bytes: &'b mut [u8],
) -> Result<&'b mut [u8], TruncationError>
fn build_bytes<'b>( &self, bytes: &'b mut [u8], ) -> Result<&'b mut [u8], TruncationError>
Source§fn built_bytes_size(&self) -> usize
fn built_bytes_size(&self) -> usize
self when serialized into a byte sequence. Read moreSource§impl<N: BuildInMessage> BuildInMessage for RecordData<'_, N>
impl<N: BuildInMessage> BuildInMessage for RecordData<'_, N>
Source§fn build_in_message(
&self,
contents: &mut [u8],
start: usize,
name: &mut NameCompressor,
) -> Result<usize, TruncationError>
fn build_in_message( &self, contents: &mut [u8], start: usize, name: &mut NameCompressor, ) -> Result<usize, TruncationError>
Source§impl<N: CanonicalName> CanonicalRecordData for RecordData<'_, N>
impl<N: CanonicalName> CanonicalRecordData for RecordData<'_, N>
Source§fn build_canonical_bytes<'b>(
&self,
bytes: &'b mut [u8],
) -> Result<&'b mut [u8], TruncationError>
fn build_canonical_bytes<'b>( &self, bytes: &'b mut [u8], ) -> Result<&'b mut [u8], TruncationError>
Source§fn cmp_canonical(&self, other: &Self) -> Ordering
fn cmp_canonical(&self, other: &Self) -> Ordering
Source§impl<'a, N: Clone> Clone for RecordData<'a, N>
impl<'a, N: Clone> Clone for RecordData<'a, N>
Source§fn clone(&self) -> RecordData<'a, N>
fn clone(&self) -> RecordData<'a, N>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a, N: Debug> Debug for RecordData<'a, N>
impl<'a, N: Debug> Debug for RecordData<'a, N>
impl<'a, N: Eq> Eq for RecordData<'a, N>
Source§impl<'a, N> From<&'a DNSKey> for RecordData<'a, N>
impl<'a, N> From<&'a DNSKey> for RecordData<'a, N>
Source§impl<'a, N> From<&'a DName> for RecordData<'a, N>
impl<'a, N> From<&'a DName> for RecordData<'a, N>
Source§impl<'a, N> From<&'a Ds> for RecordData<'a, N>
impl<'a, N> From<&'a Ds> for RecordData<'a, N>
Source§impl<'a, N> From<&'a Nsec3Param> for RecordData<'a, N>
impl<'a, N> From<&'a Nsec3Param> for RecordData<'a, N>
Source§fn from(value: &'a Nsec3Param) -> Self
fn from(value: &'a Nsec3Param) -> Self
Source§impl<'a, N> From<&'a Opt> for RecordData<'a, N>
impl<'a, N> From<&'a Opt> for RecordData<'a, N>
Source§impl<'a, N> From<&'a Srv> for RecordData<'a, N>
impl<'a, N> From<&'a Srv> for RecordData<'a, N>
Source§impl<'a, N> From<&'a Txt> for RecordData<'a, N>
impl<'a, N> From<&'a Txt> for RecordData<'a, N>
Source§impl<'a, N> From<&'a ZoneMD> for RecordData<'a, N>
impl<'a, N> From<&'a ZoneMD> for RecordData<'a, N>
Source§impl<'a, N> From<A> for RecordData<'a, N>
impl<'a, N> From<A> for RecordData<'a, N>
Source§impl<'a, N> From<Aaaa> for RecordData<'a, N>
impl<'a, N> From<Aaaa> for RecordData<'a, N>
Source§impl<'a, N> From<CName<N>> for RecordData<'a, N>
impl<'a, N> From<CName<N>> for RecordData<'a, N>
Source§impl<'a, N> From<HInfo<'a>> for RecordData<'a, N>
impl<'a, N> From<HInfo<'a>> for RecordData<'a, N>
Source§impl<'a, N> From<Mx<N>> for RecordData<'a, N>
impl<'a, N> From<Mx<N>> for RecordData<'a, N>
Source§impl<'a, N> From<Ns<N>> for RecordData<'a, N>
impl<'a, N> From<Ns<N>> for RecordData<'a, N>
Source§impl<'a, N> From<Nsec3<'a>> for RecordData<'a, N>
impl<'a, N> From<Nsec3<'a>> for RecordData<'a, N>
Source§impl<'a, N> From<Nsec<'a>> for RecordData<'a, N>
impl<'a, N> From<Nsec<'a>> for RecordData<'a, N>
Source§impl<'a, N> From<Ptr<N>> for RecordData<'a, N>
impl<'a, N> From<Ptr<N>> for RecordData<'a, N>
Source§impl<N: BuildBytes> From<RecordData<'_, N>> for BoxedRecordData
Available on crate feature alloc only.
impl<N: BuildBytes> From<RecordData<'_, N>> for BoxedRecordData
alloc only.Source§fn from(value: RecordData<'_, N>) -> Self
fn from(value: RecordData<'_, N>) -> Self
Build a RecordData into a heap allocation.
§Panics
Panics if the RecordData does not fit in a 64KiB buffer, or if the
serialized bytes cannot be parsed back into RecordData<'_, &Name>.
Source§impl<'a, N> From<Rp<N>> for RecordData<'a, N>
impl<'a, N> From<Rp<N>> for RecordData<'a, N>
Source§impl<'a, N> From<Rrsig<'a>> for RecordData<'a, N>
impl<'a, N> From<Rrsig<'a>> for RecordData<'a, N>
Source§impl<'a, N> From<Soa<N>> for RecordData<'a, N>
impl<'a, N> From<Soa<N>> for RecordData<'a, N>
Source§impl<'a, N: Hash> Hash for RecordData<'a, N>
impl<'a, N: Hash> Hash for RecordData<'a, N>
Source§impl<'a, N: SplitMessageBytes<'a>> ParseRecordData<'a> for RecordData<'a, N>
impl<'a, N: SplitMessageBytes<'a>> ParseRecordData<'a> for RecordData<'a, N>
Source§fn parse_record_data(
contents: &'a [u8],
start: usize,
rtype: RType,
) -> Result<Self, ParseError>
fn parse_record_data( contents: &'a [u8], start: usize, rtype: RType, ) -> Result<Self, ParseError>
Source§impl<'a, N: SplitBytes<'a>> ParseRecordDataBytes<'a> for RecordData<'a, N>
impl<'a, N: SplitBytes<'a>> ParseRecordDataBytes<'a> for RecordData<'a, N>
Source§fn parse_record_data_bytes(
bytes: &'a [u8],
rtype: RType,
) -> Result<Self, ParseError>
fn parse_record_data_bytes( bytes: &'a [u8], rtype: RType, ) -> Result<Self, ParseError>
Source§impl<'a, N: PartialEq> PartialEq for RecordData<'a, N>
impl<'a, N: PartialEq> PartialEq for RecordData<'a, N>
impl<'a, N: PartialEq> StructuralPartialEq for RecordData<'a, N>
Auto Trait Implementations§
impl<'a, N> Freeze for RecordData<'a, N>where
N: Freeze,
impl<'a, N> RefUnwindSafe for RecordData<'a, N>where
N: RefUnwindSafe,
impl<'a, N> Send for RecordData<'a, N>where
N: Send,
impl<'a, N> Sync for RecordData<'a, N>where
N: Sync,
impl<'a, N> Unpin for RecordData<'a, N>where
N: Unpin,
impl<'a, N> UnsafeUnpin for RecordData<'a, N>where
N: UnsafeUnpin,
impl<'a, N> UnwindSafe for RecordData<'a, N>where
N: UnwindSafe,
Blanket Implementations§
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,
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.