pub fn finish(self) -> Result<Box<Name>, Error> {
        if !self.is_fully_qualified() {
            Err(Error::NonNullTerminal)
        } else {
            unsafe {
                // SAFETY: we promise that we're passing a valid
                // on-the-wire representation and correct label offsets.
                Ok(new_boxed_name(
                    self.wire_repr.len(),
                    &self.label_offsets,
                    &[&self.wire_repr],
                ))
            }
        }
    }
/// Finishes the construction of the domain name, returning the
/// final boxed [`Name`] and consuming the `NameBuilder`. This
/// implicitly finishes the current label. Since the last label of
/// a domain name must be null, this fails if that is not the case.
Finishes the construction of the domain name, returning the
final boxed [`Name`] and consuming the `NameBuilder`. This
implicitly finishes the current label. Since the last label of
a domain name must be null, this fails if that is not the case.
Finishes the construction of the domain name returning the final boxed [ ` Name ` ] and consuming the ` NameBuilder ` . This implicitly finishes the current label . Since the last label of a domain name must be null this fails if that is not the case .
pub fn finish(self) -> Result<Box<Name>, Error> {
        if !self.is_fully_qualified() {
            Err(Error::NonNullTerminal)
        } else {
            unsafe {
                // SAFETY: we promise that we're passing a valid
                // on-the-wire representation and correct label offsets.
                Ok(new_boxed_name(
                    self.wire_repr.len(),
                    &self.label_offsets,
                    &[&self.wire_repr],
                ))
            }
        }
    }
pub fn finish ( self ) -> Result < Box < Name > , Error > { if ! self . is_fully_qualified ( ) { Err ( Error :: NonNullTerminal ) } else { unsafe { // SAFETY: we promise that we're passing a valid // on-the-wire representation and correct label offsets. Ok ( new_boxed_name ( self . wire_repr . len ( ) , & self . label_offsets , & [ & self . wire_repr ] , ) ) } } }
Finishes the construction of the domain name, returning the
final boxed [`Name`] and consuming the `NameBuilder`.
Finishes the construction of the domain name returning the final boxed [ ` Name ` ] and consuming the ` NameBuilder ` .
self
self