pub struct Chain<L, R> { /* private fields */ }
Expand description
Two domain names chained together.
This type is the result of calling the chain
method on
RelativeDname
, UncertainDname
, or on Chain
itself.
The chain can be both an absolute or relative domain name—and implements
the respective traits ToDname
or ToRelativeDname
—, depending on
whether the second name is absolute or relative.
A chain on an uncertain name is special in that the second name is only used if the uncertain name is relative.
Implementations§
source§impl<L: ToRelativeDname, R: ToLabelIter> Chain<L, R>
impl<L: ToRelativeDname, R: ToLabelIter> Chain<L, R>
sourcepub fn chain<N: ToLabelIter>(
self,
other: N
) -> Result<Chain<Self, N>, LongChainError>
pub fn chain<N: ToLabelIter>( self, other: N ) -> Result<Chain<Self, N>, LongChainError>
Extends the chain with another domain name.
While the method accepts anything Compose
as the second element of
the chain, the resulting Chain
will only implement ToDname
or
ToRelativeDname
if if also implements ToDname
or
ToRelativeDname
, respectively.
The method will fail with an error if the chained name is longer than 255 bytes.
Trait Implementations§
source§impl<L: ToRelativeDname, R: ToDname> ToDname for Chain<L, R>
impl<L: ToRelativeDname, R: ToDname> ToDname for Chain<L, R>
source§fn to_dname<Octets>(&self) -> Result<Dname<Octets>, PushError>where
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
fn to_dname<Octets>(&self) -> Result<Dname<Octets>, PushError>where Octets: FromBuilder, <Octets as FromBuilder>::Builder: EmptyBuilder,
source§fn to_canonical_dname<Octets>(&self) -> Result<Dname<Octets>, PushError>where
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
fn to_canonical_dname<Octets>(&self) -> Result<Dname<Octets>, PushError>where Octets: FromBuilder, <Octets as FromBuilder>::Builder: EmptyBuilder,
source§fn as_flat_slice(&self) -> Option<&[u8]>
fn as_flat_slice(&self) -> Option<&[u8]>
fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target ) -> Result<(), Target::AppendError>
fn compose_canonical<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target ) -> Result<(), Target::AppendError>
source§fn composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
fn composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
source§fn lowercase_composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
fn lowercase_composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
source§fn rrsig_label_count(&self) -> u8
fn rrsig_label_count(&self) -> u8
source§impl<Octets, R> ToDname for Chain<UncertainDname<Octets>, R>where
Octets: AsRef<[u8]>,
R: ToDname,
impl<Octets, R> ToDname for Chain<UncertainDname<Octets>, R>where Octets: AsRef<[u8]>, R: ToDname,
source§fn to_dname<Octets>(&self) -> Result<Dname<Octets>, PushError>where
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
fn to_dname<Octets>(&self) -> Result<Dname<Octets>, PushError>where Octets: FromBuilder, <Octets as FromBuilder>::Builder: EmptyBuilder,
source§fn to_canonical_dname<Octets>(&self) -> Result<Dname<Octets>, PushError>where
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
fn to_canonical_dname<Octets>(&self) -> Result<Dname<Octets>, PushError>where Octets: FromBuilder, <Octets as FromBuilder>::Builder: EmptyBuilder,
source§fn as_flat_slice(&self) -> Option<&[u8]>
fn as_flat_slice(&self) -> Option<&[u8]>
fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target ) -> Result<(), Target::AppendError>
fn compose_canonical<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target ) -> Result<(), Target::AppendError>
source§fn composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
fn composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
source§fn lowercase_composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
fn lowercase_composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
source§fn rrsig_label_count(&self) -> u8
fn rrsig_label_count(&self) -> u8
source§impl<L: ToRelativeDname, R: ToLabelIter> ToLabelIter for Chain<L, R>
impl<L: ToRelativeDname, R: ToLabelIter> ToLabelIter for Chain<L, R>
§type LabelIter<'a> = ChainIter<'a, L, R>
where
L: 'a,
R: 'a
type LabelIter<'a> = ChainIter<'a, L, R> where L: 'a, R: 'a
source§fn iter_labels(&self) -> Self::LabelIter<'_>
fn iter_labels(&self) -> Self::LabelIter<'_>
source§fn compose_len(&self) -> u16
fn compose_len(&self) -> u16
source§fn starts_with<N: ToLabelIter + ?Sized>(&self, base: &N) -> bool
fn starts_with<N: ToLabelIter + ?Sized>(&self, base: &N) -> bool
base
is a prefix of self
.source§impl<Octs, R> ToLabelIter for Chain<UncertainDname<Octs>, R>where
Octs: AsRef<[u8]>,
R: ToDname,
impl<Octs, R> ToLabelIter for Chain<UncertainDname<Octs>, R>where Octs: AsRef<[u8]>, R: ToDname,
§type LabelIter<'a> = UncertainChainIter<'a, Octs, R>
where
Octs: 'a,
R: 'a
type LabelIter<'a> = UncertainChainIter<'a, Octs, R> where Octs: 'a, R: 'a
source§fn iter_labels(&self) -> Self::LabelIter<'_>
fn iter_labels(&self) -> Self::LabelIter<'_>
source§fn compose_len(&self) -> u16
fn compose_len(&self) -> u16
source§fn starts_with<N: ToLabelIter + ?Sized>(&self, base: &N) -> bool
fn starts_with<N: ToLabelIter + ?Sized>(&self, base: &N) -> bool
base
is a prefix of self
.