pub struct Naptr<Octs, Name> { /* private fields */ }
Expand description
Naptr record data.
The Naptr encodes DNS rules for URI delegation, allowing changes and redelegation. It uses regex for string-to-domain name conversion, chosen for compactness and expressivity in small DNS packets.
The Naptr record type is defined in RFC 3403, section 4.1.
Implementations§
Source§impl<Octs, Name> Naptr<Octs, Name>
impl<Octs, Name> Naptr<Octs, Name>
Sourcepub fn new(
order: u16,
preference: u16,
flags: CharStr<Octs>,
services: CharStr<Octs>,
regexp: CharStr<Octs>,
replacement: Name,
) -> Self
pub fn new( order: u16, preference: u16, flags: CharStr<Octs>, services: CharStr<Octs>, regexp: CharStr<Octs>, replacement: Name, ) -> Self
Creates a new Naptr record data from content.
Sourcepub fn order(&self) -> u16
pub fn order(&self) -> u16
The order of processing the records is from lowest to highest. If two records have the same order value, they should be processed according to their preference value and services field.
Sourcepub fn preference(&self) -> u16
pub fn preference(&self) -> u16
The priority of the DDDS Algorithm, from lowest to highest.
Sourcepub fn flags(&self) -> &CharStr<Octs>
pub fn flags(&self) -> &CharStr<Octs>
The flags controls aspects of the rewriting and interpretation of the fields in the record.
Sourcepub fn services(&self) -> &CharStr<Octs>
pub fn services(&self) -> &CharStr<Octs>
The services specify the Service Parameters applicable to this delegation path.
Sourcepub fn regexp(&self) -> &CharStr<Octs>
pub fn regexp(&self) -> &CharStr<Octs>
The regexp containing a substitution expression that is applied to the original string held by the client in order to construct the next domain name to lookup.
Sourcepub fn replacement(&self) -> &Name
pub fn replacement(&self) -> &Name
The replacement is the next domain name to query for, depending on the potential values found in the flags field.
pub fn scan<S: Scanner<Octets = Octs, Name = Name>>( scanner: &mut S, ) -> Result<Self, S::Error>
Trait Implementations§
Source§impl<Octs, OtherOcts, Name, OtherName> CanonicalOrd<Naptr<OtherOcts, OtherName>> for Naptr<Octs, Name>
impl<Octs, OtherOcts, Name, OtherName> CanonicalOrd<Naptr<OtherOcts, OtherName>> for Naptr<Octs, Name>
Source§fn canonical_cmp(&self, other: &Naptr<OtherOcts, OtherName>) -> Ordering
fn canonical_cmp(&self, other: &Naptr<OtherOcts, OtherName>) -> 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, Name> ComposeRecordData for Naptr<Octs, Name>
impl<Octs, Name> ComposeRecordData for Naptr<Octs, Name>
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<Octs, TOcts, Name, TName> FlattenInto<Naptr<TOcts, TName>> for Naptr<Octs, Name>
impl<Octs, TOcts, Name, TName> FlattenInto<Naptr<TOcts, TName>> for Naptr<Octs, Name>
type AppendError = <TOcts as OctetsFrom<Octs>>::Error
fn try_flatten_into(self) -> Result<Naptr<TOcts, TName>, TOcts::Error>
fn flatten_into(self) -> Target
Source§impl<O, N> From<Naptr<O, N>> for AllRecordData<O, N>
impl<O, N> From<Naptr<O, N>> for AllRecordData<O, N>
Source§impl<O, N> From<Naptr<O, N>> for ZoneRecordData<O, N>
impl<O, N> From<Naptr<O, N>> for ZoneRecordData<O, N>
Source§impl<Octs, SrcOcts, Name, SrcName> OctetsFrom<Naptr<SrcOcts, SrcName>> for Naptr<Octs, Name>
impl<Octs, SrcOcts, Name, SrcName> OctetsFrom<Naptr<SrcOcts, SrcName>> for Naptr<Octs, Name>
type Error = <Octs as OctetsFrom<SrcOcts>>::Error
Source§fn try_octets_from(source: Naptr<SrcOcts, SrcName>) -> Result<Self, Self::Error>
fn try_octets_from(source: Naptr<SrcOcts, SrcName>) -> Result<Self, Self::Error>
Source§fn octets_from(source: Source) -> Self
fn octets_from(source: Source) -> Self
Source§impl<Octs, Name> Ord for Naptr<Octs, Name>
impl<Octs, Name> Ord for Naptr<Octs, Name>
Source§impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Naptr<Octs::Range<'a>, ParsedName<Octs::Range<'a>>>
impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Naptr<Octs::Range<'a>, ParsedName<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, OtherOcts, Name, OtherName> PartialEq<Naptr<OtherOcts, OtherName>> for Naptr<Octs, Name>
impl<Octs, OtherOcts, Name, OtherName> PartialEq<Naptr<OtherOcts, OtherName>> for Naptr<Octs, Name>
Source§impl<Octs, OtherOcts, Name, OtherName> PartialOrd<Naptr<OtherOcts, OtherName>> for Naptr<Octs, Name>
impl<Octs, OtherOcts, Name, OtherName> PartialOrd<Naptr<OtherOcts, OtherName>> for Naptr<Octs, Name>
Source§impl<Octs, Name> RecordData for Naptr<Octs, Name>
impl<Octs, Name> RecordData for Naptr<Octs, Name>
Source§impl<Octs, Name> ZonefileFmt for Naptr<Octs, Name>
impl<Octs, Name> ZonefileFmt for Naptr<Octs, Name>
Source§fn fmt(&self, p: &mut impl Formatter) -> Result
fn fmt(&self, p: &mut impl Formatter) -> Result
fmt::Formatter
Read more