pub fn try_push_slice(&mut self, octets: &[u8]) -> Result<(), Error> {
        if (self.label_len as usize) + octets.len() > MAX_LABEL_LEN {
            Err(Error::LabelTooLong)
        } else if self.wire_repr.try_extend_from_slice(octets).is_ok() {
            self.label_len += octets.len() as u8;
            Ok(())
        } else {
            Err(Error::NameTooLong)
        }
    }
// Tries to add the given slice to the current label. This will
// fail if doing so would make the label or name too long. In the
// error case, the `NameBuilder`'s state remains unchanged.
Tries to add the given slice to the current label. This will
fail if doing so would make the label or name too long. In the
error case, the `NameBuilder`'s state remains unchanged.
Tries to add the given slice to the current label . This will fail if doing so would make the label or name too long . In the error case the ` NameBuilder ` ' s state remains unchanged .
pub fn try_push_slice(&mut self, octets: &[u8]) -> Result<(), Error> {
        if (self.label_len as usize) + octets.len() > MAX_LABEL_LEN {
            Err(Error::LabelTooLong)
        } else if self.wire_repr.try_extend_from_slice(octets).is_ok() {
            self.label_len += octets.len() as u8;
            Ok(())
        } else {
            Err(Error::NameTooLong)
        }
    }
pub fn try_push_slice ( & mut self , octets : & [ u8 ] ) -> Result < ( ) , Error > { if ( self . label_len as usize ) + octets . len ( ) > MAX_LABEL_LEN { Err ( Error :: LabelTooLong ) } else if self . wire_repr . try_extend_from_slice ( octets ) . is_ok ( ) { self . label_len += octets . len ( ) as u8 ; Ok ( ( ) ) } else { Err ( Error :: NameTooLong ) } }
Tries to add the given slice to the current label.
Tries to add the given slice to the current label .
&mut self
octets
&[u8]
&mut self
octets
&[u8]