[−][src]Struct domain::base::name::Chain
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
impl<L: ToRelativeDname, R: ToEitherDname> Chain<L, R>
[src]
pub fn chain<N: ToEitherDname>(
self,
other: N
) -> Result<Chain<Self, N>, LongChainError>
[src]
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.
impl<L, R> Chain<L, R>
[src]
Trait Implementations
impl<L: Clone, R: Clone> Clone for Chain<L, R>
[src]
impl<L: ToRelativeDname, R: ToEitherDname> Compose for Chain<L, R>
[src]
fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>
[src]
fn compose_canonical<T: OctetsBuilder>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
[src]
&self,
target: &mut T
) -> Result<(), ShortBuf>
impl<Octets, R: ToDname> Compose for Chain<UncertainDname<Octets>, R> where
Octets: AsRef<[u8]>,
R: ToDname,
[src]
Octets: AsRef<[u8]>,
R: ToDname,
fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>
[src]
fn compose_canonical<T: OctetsBuilder>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
[src]
&self,
target: &mut T
) -> Result<(), ShortBuf>
impl<L: Debug, R: Debug> Debug for Chain<L, R>
[src]
impl<L: Display, R: Display> Display for Chain<L, R>
[src]
impl<L: ToRelativeDname, R: ToDname> ToDname for Chain<L, R>
[src]
fn to_dname<Octets>(&self) -> Result<Dname<Octets>, PushError> where
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
[src]
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
fn as_flat_slice(&self) -> Option<&[u8]>
[src]
fn to_cow(&self) -> Dname<Cow<[u8]>>
[src]
fn to_vec(&self) -> Dname<Vec<u8>>
[src]
fn name_eq<N: ToDname + ?Sized>(&self, other: &N) -> bool
[src]
fn name_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
[src]
fn composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
[src]
fn lowercase_composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
[src]
fn rrsig_label_count(&self) -> u8
[src]
impl<Octets, R> ToDname for Chain<UncertainDname<Octets>, R> where
Octets: AsRef<[u8]>,
R: ToDname,
[src]
Octets: AsRef<[u8]>,
R: ToDname,
fn to_dname<Octets>(&self) -> Result<Dname<Octets>, PushError> where
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
[src]
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
fn as_flat_slice(&self) -> Option<&[u8]>
[src]
fn to_cow(&self) -> Dname<Cow<[u8]>>
[src]
fn to_vec(&self) -> Dname<Vec<u8>>
[src]
fn name_eq<N: ToDname + ?Sized>(&self, other: &N) -> bool
[src]
fn name_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
[src]
fn composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
[src]
fn lowercase_composed_cmp<N: ToDname + ?Sized>(&self, other: &N) -> Ordering
[src]
fn rrsig_label_count(&self) -> u8
[src]
impl<'a, L: ToRelativeDname, R: ToEitherDname> ToLabelIter<'a> for Chain<L, R>
[src]
type LabelIter = ChainIter<'a, L, R>
The type of the iterator over the labels. Read more
fn iter_labels(&'a self) -> Self::LabelIter
[src]
fn len(&'a self) -> usize
[src]
fn starts_with<N: ToLabelIter<'a> + ?Sized>(&'a self, base: &'a N) -> bool
[src]
fn ends_with<N: ToLabelIter<'a> + ?Sized>(&'a self, base: &'a N) -> bool
[src]
impl<'a, Octets, R> ToLabelIter<'a> for Chain<UncertainDname<Octets>, R> where
Octets: AsRef<[u8]>,
R: ToDname,
[src]
Octets: AsRef<[u8]>,
R: ToDname,
type LabelIter = UncertainChainIter<'a, Octets, R>
The type of the iterator over the labels. Read more
fn iter_labels(&'a self) -> Self::LabelIter
[src]
fn len(&'a self) -> usize
[src]
fn starts_with<N: ToLabelIter<'a> + ?Sized>(&'a self, base: &'a N) -> bool
[src]
fn ends_with<N: ToLabelIter<'a> + ?Sized>(&'a self, base: &'a N) -> bool
[src]
impl<L: ToRelativeDname, R: ToRelativeDname> ToRelativeDname for Chain<L, R>
[src]
fn to_relative_dname<Octets>(&self) -> Result<RelativeDname<Octets>, PushError> where
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
[src]
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder,
fn as_flat_slice(&self) -> Option<&[u8]>
[src]
fn to_cow(&self) -> RelativeDname<Cow<[u8]>>
[src]
fn to_vec(&self) -> RelativeDname<Vec<u8>>
[src]
fn is_empty(&self) -> bool
[src]
fn chain<N: ToEitherDname>(
self,
suffix: N
) -> Result<Chain<Self, N>, LongChainError> where
Self: Sized,
[src]
self,
suffix: N
) -> Result<Chain<Self, N>, LongChainError> where
Self: Sized,
fn chain_root(self) -> Chain<Self, Dname<&'static [u8]>> where
Self: Sized,
[src]
Self: Sized,
fn name_eq<N: ToRelativeDname + ?Sized>(&self, other: &N) -> bool
[src]
fn name_cmp<N: ToRelativeDname + ?Sized>(&self, other: &N) -> Ordering
[src]
Auto Trait Implementations
impl<L, R> RefUnwindSafe for Chain<L, R> where
L: RefUnwindSafe,
R: RefUnwindSafe,
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for Chain<L, R> where
L: Send,
R: Send,
L: Send,
R: Send,
impl<L, R> Sync for Chain<L, R> where
L: Sync,
R: Sync,
L: Sync,
R: Sync,
impl<L, R> Unpin for Chain<L, R> where
L: Unpin,
R: Unpin,
L: Unpin,
R: Unpin,
impl<L, R> UnwindSafe for Chain<L, R> where
L: UnwindSafe,
R: UnwindSafe,
L: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,