pub(crate) fn encode(&self) -> Vec<u8> {
        enum UniqueTypeCode {
            DnsName = 0x01,
        }

        let ServerName::DnsName(dns_name) = self;
        let bytes = dns_name.as_ref();

        let mut r = Vec::with_capacity(2 + bytes.as_ref().len());
        r.push(UniqueTypeCode::DnsName as u8);
        r.push(bytes.as_ref().len() as u8);
        r.extend_from_slice(bytes.as_ref());

        r
    }
/// Return a prefix-free, unique encoding for the name.
Return a prefix-free, unique encoding for the name.
Return a prefix - free unique encoding for the name .
pub(crate) fn encode(&self) -> Vec<u8> {
        enum UniqueTypeCode {
            DnsName = 0x01,
        }
        let ServerName::DnsName(dns_name) = self;
        let bytes = dns_name.as_ref();
        let mut r = Vec::with_capacity(2 + bytes.as_ref().len());
        r.push(UniqueTypeCode::DnsName as u8);
        r.push(bytes.as_ref().len() as u8);
        r.extend_from_slice(bytes.as_ref());
        r
    }
pub ( crate ) fn encode ( & self ) -> Vec < u8 > { enum UniqueTypeCode { DnsName = 0x01 , } let ServerName :: DnsName ( dns_name ) = self ; let bytes = dns_name . as_ref ( ) ; let mut r = Vec :: with_capacity ( 2 + bytes . as_ref ( ) . len ( ) ) ; r . push ( UniqueTypeCode :: DnsName as u8 ) ; r . push ( bytes . as_ref ( ) . len ( ) as u8 ) ; r . extend_from_slice ( bytes . as_ref ( ) ) ; r }
Return a prefix-free, unique encoding for the name.
Return a prefix - free unique encoding for the name .
&self