pub struct UnknownRecordData<Octets> { /* 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
sourceimpl<Octets> UnknownRecordData<Octets>
impl<Octets> UnknownRecordData<Octets>
sourceimpl UnknownRecordData<Bytes>
impl UnknownRecordData<Bytes>
Trait Implementations
sourceimpl<Octets, Other> CanonicalOrd<UnknownRecordData<Other>> for UnknownRecordData<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
impl<Octets, Other> CanonicalOrd<UnknownRecordData<Other>> for UnknownRecordData<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
sourcefn canonical_cmp(&self, other: &UnknownRecordData<Other>) -> Ordering
fn canonical_cmp(&self, other: &UnknownRecordData<Other>) -> Ordering
Returns the canonical ordering between self
and other
.
sourcefn canonical_lt(&self, other: &Rhs) -> bool
fn canonical_lt(&self, other: &Rhs) -> bool
Returns whether self
is canonically less than other
.
sourcefn canonical_le(&self, other: &Rhs) -> bool
fn canonical_le(&self, other: &Rhs) -> bool
Returns whether self
is canonically less than or equal to other
.
sourcefn canonical_gt(&self, other: &Rhs) -> bool
fn canonical_gt(&self, other: &Rhs) -> bool
Returns whether self
is canonically greater than other
.
sourcefn canonical_ge(&self, other: &Rhs) -> bool
fn canonical_ge(&self, other: &Rhs) -> bool
Returns whether self
is canonically greater than or equal to other
.
sourceimpl<Octets: Clone> Clone for UnknownRecordData<Octets>
impl<Octets: Clone> Clone for UnknownRecordData<Octets>
sourcefn clone(&self) -> UnknownRecordData<Octets>
fn clone(&self) -> UnknownRecordData<Octets>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<Octets: AsRef<[u8]>> Compose for UnknownRecordData<Octets>
impl<Octets: AsRef<[u8]>> Compose for UnknownRecordData<Octets>
sourcefn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>
fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>
Appends the concrete representation of the value to the target. Read more
sourcefn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the canonical representation of the value to the target. Read more
sourceimpl<Octets: AsRef<[u8]>> Debug for UnknownRecordData<Octets>
impl<Octets: AsRef<[u8]>> Debug for UnknownRecordData<Octets>
sourceimpl<'de, Octets> Deserialize<'de> for UnknownRecordData<Octets>where
Octets: DeserializeOctets<'de>,
impl<'de, Octets> Deserialize<'de> for UnknownRecordData<Octets>where
Octets: DeserializeOctets<'de>,
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<Octets: AsRef<[u8]>> Display for UnknownRecordData<Octets>
impl<Octets: AsRef<[u8]>> Display for UnknownRecordData<Octets>
sourceimpl<O, N> From<UnknownRecordData<O>> for AllRecordData<O, N>
impl<O, N> From<UnknownRecordData<O>> for AllRecordData<O, N>
sourcefn from(value: UnknownRecordData<O>) -> Self
fn from(value: UnknownRecordData<O>) -> Self
Converts to this type from the input type.
sourceimpl<O, N> From<UnknownRecordData<O>> for ZoneRecordData<O, N>
impl<O, N> From<UnknownRecordData<O>> for ZoneRecordData<O, N>
sourcefn from(value: UnknownRecordData<O>) -> Self
fn from(value: UnknownRecordData<O>) -> Self
Converts to this type from the input type.
sourceimpl<Octets, SrcOctets> OctetsFrom<UnknownRecordData<SrcOctets>> for UnknownRecordData<Octets>where
Octets: OctetsFrom<SrcOctets>,
impl<Octets, SrcOctets> OctetsFrom<UnknownRecordData<SrcOctets>> for UnknownRecordData<Octets>where
Octets: OctetsFrom<SrcOctets>,
sourcefn octets_from(source: UnknownRecordData<SrcOctets>) -> Result<Self, ShortBuf>
fn octets_from(source: UnknownRecordData<SrcOctets>) -> Result<Self, ShortBuf>
Performs the conversion.
sourceimpl<Octets: AsRef<[u8]>> Ord for UnknownRecordData<Octets>
impl<Octets: AsRef<[u8]>> Ord for UnknownRecordData<Octets>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<Octets, Ref> ParseRecordData<Ref> for UnknownRecordData<Octets>where
Octets: AsRef<[u8]>,
Ref: OctetsRef<Range = Octets>,
impl<Octets, Ref> ParseRecordData<Ref> for UnknownRecordData<Octets>where
Octets: AsRef<[u8]>,
Ref: OctetsRef<Range = Octets>,
sourcefn parse_data(
rtype: Rtype,
parser: &mut Parser<Ref>
) -> Result<Option<Self>, ParseError>
fn parse_data(
rtype: Rtype,
parser: &mut Parser<Ref>
) -> Result<Option<Self>, ParseError>
Parses the record data. Read more
sourceimpl<Octets, Other> PartialEq<UnknownRecordData<Other>> for UnknownRecordData<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
impl<Octets, Other> PartialEq<UnknownRecordData<Other>> for UnknownRecordData<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
sourcefn eq(&self, other: &UnknownRecordData<Other>) -> bool
fn eq(&self, other: &UnknownRecordData<Other>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl<Octets, Other> PartialOrd<UnknownRecordData<Other>> for UnknownRecordData<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
impl<Octets, Other> PartialOrd<UnknownRecordData<Other>> for UnknownRecordData<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
sourcefn partial_cmp(&self, other: &UnknownRecordData<Other>) -> Option<Ordering>
fn partial_cmp(&self, other: &UnknownRecordData<Other>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Octets: AsRef<[u8]>> RecordData for UnknownRecordData<Octets>
impl<Octets: AsRef<[u8]>> RecordData for UnknownRecordData<Octets>
sourceimpl<Octets> Serialize for UnknownRecordData<Octets>where
Octets: SerializeOctets,
impl<Octets> Serialize for UnknownRecordData<Octets>where
Octets: SerializeOctets,
impl<Octets: AsRef<[u8]>> Eq for UnknownRecordData<Octets>
Auto Trait Implementations
impl<Octets> RefUnwindSafe for UnknownRecordData<Octets>where
Octets: RefUnwindSafe,
impl<Octets> Send for UnknownRecordData<Octets>where
Octets: Send,
impl<Octets> Sync for UnknownRecordData<Octets>where
Octets: Sync,
impl<Octets> Unpin for UnknownRecordData<Octets>where
Octets: Unpin,
impl<Octets> UnwindSafe for UnknownRecordData<Octets>where
Octets: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.