pub struct UnknownRecordData<Octs> { /* private fields */ }
Expand description
A type for parsing any type of record data.
This type accepts any record type and stores the plain, unparsed record data as an octets sequence.
Because some record types allow compressed domain names in their record data, this type cannot be used safely with these record types. For these record types, the structure of the content needs to be known.
RFC 3597 limits the types for which compressed names are allowed in the
record data to those defined in RFC 1035 itself. Specific types for all
these record types exist in
domain::rdata::rfc1035
.
Ultimately, you should only use this type for record types for which there
is no implementation available in this crate. The two types
AllRecordData
and MasterRecordData
provide a convenient way to
always use the correct record data type.
Implementations§
Source§impl<Octs> UnknownRecordData<Octs>
impl<Octs> UnknownRecordData<Octs>
Sourcepub fn from_octets(rtype: Rtype, data: Octs) -> Result<Self, LongRecordData>
pub fn from_octets(rtype: Rtype, data: Octs) -> Result<Self, LongRecordData>
Creates generic record data from a bytes value contain the data.
Trait Implementations§
Source§impl<Octs, Other> CanonicalOrd<UnknownRecordData<Other>> for UnknownRecordData<Octs>
impl<Octs, Other> CanonicalOrd<UnknownRecordData<Other>> for UnknownRecordData<Octs>
Source§fn canonical_cmp(&self, other: &UnknownRecordData<Other>) -> Ordering
fn canonical_cmp(&self, other: &UnknownRecordData<Other>) -> Ordering
self
and other
.Source§fn canonical_lt(&self, other: &Rhs) -> bool
fn canonical_lt(&self, other: &Rhs) -> bool
self
is canonically less than other
.Source§fn canonical_le(&self, other: &Rhs) -> bool
fn canonical_le(&self, other: &Rhs) -> bool
self
is canonically less than or equal to other
.Source§fn canonical_gt(&self, other: &Rhs) -> bool
fn canonical_gt(&self, other: &Rhs) -> bool
self
is canonically greater than other
.Source§fn canonical_ge(&self, other: &Rhs) -> bool
fn canonical_ge(&self, other: &Rhs) -> bool
self
is canonically greater than or equal to other
.Source§impl<Octs: Clone> Clone for UnknownRecordData<Octs>
impl<Octs: Clone> Clone for UnknownRecordData<Octs>
Source§fn clone(&self) -> UnknownRecordData<Octs>
fn clone(&self) -> UnknownRecordData<Octs>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<Octs: AsRef<[u8]>> ComposeRecordData for UnknownRecordData<Octs>
impl<Octs: AsRef<[u8]>> ComposeRecordData for UnknownRecordData<Octs>
Source§fn rdlen(&self, _compress: bool) -> Option<u16>
fn rdlen(&self, _compress: bool) -> Option<u16>
Source§fn compose_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
target
.Source§fn compose_canonical_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_canonical_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
target
.