pub fn read_name_rdata(buf: &[u8], cursor: usize) -> Result<Box<Rdata>, ReadRdataError> {
    let (name, len) = Name::try_from_compressed(buf, cursor)?;
    if buf.len() - cursor != len {
        Err(ReadRdataError::Other)
    } else {
        Ok(<&Rdata>::try_from(name.wire_repr()).unwrap().to_owned())
    }
}
/// Validates and decompresses RDATA consisting of a single domain name.
/// This is for the implementation of [`Rdata::read`].
Validates and decompresses RDATA consisting of a single domain name.
This is for the implementation of [`Rdata::read`].
Validates and decompresses RDATA consisting of a single domain name . This is for the implementation of [ ` Rdata :: read ` ] .
pub fn read_name_rdata(buf: &[u8], cursor: usize) -> Result<Box<Rdata>, ReadRdataError> {
    let (name, len) = Name::try_from_compressed(buf, cursor)?;
    if buf.len() - cursor != len {
        Err(ReadRdataError::Other)
    } else {
        Ok(<&Rdata>::try_from(name.wire_repr()).unwrap().to_owned())
    }
}
pub fn read_name_rdata ( buf : & [ u8 ] , cursor : usize ) -> Result < Box < Rdata > , ReadRdataError > { let ( name , len ) = Name :: try_from_compressed ( buf , cursor ) ? ; if buf . len ( ) - cursor != len { Err ( ReadRdataError :: Other ) } else { Ok ( < & Rdata > :: try_from ( name . wire_repr ( ) ) . unwrap ( ) . to_owned ( ) ) } }
Validates and decompresses RDATA consisting of a single domain name.
Validates and decompresses RDATA consisting of a single domain name .
buf
&[u8]
cursor
usize
buf
&[u8]
cursor
usize