Struct domain::base::rdata::UnknownRecordData
source · 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
.source§fn compose_len_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
source§fn compose_canonical_len_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_canonical_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
source§impl<O, N> From<UnknownRecordData<O>> for AllRecordData<O, N>
impl<O, N> From<UnknownRecordData<O>> for AllRecordData<O, N>
source§fn from(value: UnknownRecordData<O>) -> Self
fn from(value: UnknownRecordData<O>) -> Self
source§impl<O, N> From<UnknownRecordData<O>> for ZoneRecordData<O, N>
impl<O, N> From<UnknownRecordData<O>> for ZoneRecordData<O, N>
source§fn from(value: UnknownRecordData<O>) -> Self
fn from(value: UnknownRecordData<O>) -> Self
source§impl<Octs, SrcOcts> OctetsFrom<UnknownRecordData<SrcOcts>> for UnknownRecordData<Octs>where
Octs: OctetsFrom<SrcOcts>,
impl<Octs, SrcOcts> OctetsFrom<UnknownRecordData<SrcOcts>> for UnknownRecordData<Octs>where
Octs: OctetsFrom<SrcOcts>,
type Error = <Octs as OctetsFrom<SrcOcts>>::Error
source§fn try_octets_from(
source: UnknownRecordData<SrcOcts>,
) -> Result<Self, Self::Error>
fn try_octets_from( source: UnknownRecordData<SrcOcts>, ) -> Result<Self, Self::Error>
source§impl<Octs: AsRef<[u8]>> Ord for UnknownRecordData<Octs>
impl<Octs: AsRef<[u8]>> Ord for UnknownRecordData<Octs>
source§impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for UnknownRecordData<Octs::Range<'a>>
impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for UnknownRecordData<Octs::Range<'a>>
source§fn parse_rdata(
rtype: Rtype,
parser: &mut Parser<'a, Octs>,
) -> Result<Option<Self>, ParseError>
fn parse_rdata( rtype: Rtype, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>
source§impl<Octs, Other> PartialEq<UnknownRecordData<Other>> for UnknownRecordData<Octs>
impl<Octs, Other> PartialEq<UnknownRecordData<Other>> for UnknownRecordData<Octs>
source§fn eq(&self, other: &UnknownRecordData<Other>) -> bool
fn eq(&self, other: &UnknownRecordData<Other>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<Octs, Other> PartialOrd<UnknownRecordData<Other>> for UnknownRecordData<Octs>
impl<Octs, Other> PartialOrd<UnknownRecordData<Other>> for UnknownRecordData<Octs>
source§fn partial_cmp(&self, other: &UnknownRecordData<Other>) -> Option<Ordering>
fn partial_cmp(&self, other: &UnknownRecordData<Other>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more