[][src]Struct domain::base::name::Chain

pub struct Chain<L, R> { /* fields omitted */ }

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]

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]

pub fn unwrap(self) -> (L, R)[src]

Unwraps the chain into its two constituent components.

Trait Implementations

impl<L: Clone, R: Clone> Clone for Chain<L, R>[src]

impl<L: ToRelativeDname, R: ToEitherDname> Compose for Chain<L, R>[src]

impl<Octets, R: ToDname> Compose for Chain<UncertainDname<Octets>, R> where
    Octets: AsRef<[u8]>,
    R: ToDname
[src]

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]

impl<Octets, R> ToDname for Chain<UncertainDname<Octets>, R> where
    Octets: AsRef<[u8]>,
    R: ToDname
[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

impl<'a, Octets, R> ToLabelIter<'a> for Chain<UncertainDname<Octets>, R> where
    Octets: AsRef<[u8]>,
    R: ToDname
[src]

type LabelIter = UncertainChainIter<'a, Octets, R>

The type of the iterator over the labels. Read more

impl<L: ToRelativeDname, R: ToRelativeDname> ToRelativeDname for Chain<L, R>[src]

Auto Trait Implementations

impl<L, R> RefUnwindSafe for Chain<L, R> where
    L: RefUnwindSafe,
    R: RefUnwindSafe

impl<L, R> Send for Chain<L, R> where
    L: Send,
    R: Send

impl<L, R> Sync for Chain<L, R> where
    L: Sync,
    R: Sync

impl<L, R> Unpin for Chain<L, R> where
    L: Unpin,
    R: Unpin

impl<L, R> UnwindSafe for Chain<L, R> where
    L: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,