fn from_unchecked(octets: &[u8]) -> Self {
        assert!(octets.len() <= MAX_LABEL_LEN);
        let mut buf = LabelBuf {
            len: octets.len() as u8,
            data: [0; MAX_LABEL_LEN],
        };
        buf.data[..octets.len()].copy_from_slice(octets);
        buf
    }
/// Constructs a `LabelBuf` from the given octets. The length of the
/// slice is checked only in an assertion; the caller is expected to
/// ensure that it is valid.
Constructs a `LabelBuf` from the given octets. The length of the
slice is checked only in an assertion; the caller is expected to
ensure that it is valid.
Constructs a ` LabelBuf ` from the given octets . The length of the slice is checked only in an assertion ; the caller is expected to ensure that it is valid .
fn from_unchecked(octets: &[u8]) -> Self {
        assert!(octets.len() <= MAX_LABEL_LEN);
        let mut buf = LabelBuf {
            len: octets.len() as u8,
            data: [0; MAX_LABEL_LEN],
        };
        buf.data[..octets.len()].copy_from_slice(octets);
        buf
    }
fn from_unchecked ( octets : & [ u8 ] ) -> Self { assert ! ( octets len ( ) MAX_LABEL_LEN ) ; let mut buf = LabelBuf { len : octets . len ( ) as u8 , data : [ 0 ; MAX_LABEL_LEN ] , } ; buf . data [ .. octets . len ( ) ] . copy_from_slice ( octets ) ; buf }
Constructs a `LabelBuf` from the given octets.
Constructs a ` LabelBuf ` from the given octets .
octets
&[u8]
octets
&[u8]