pub fn read_question(&mut self) -> Result<Question> {
        let (qname, qname_len) =
            Name::try_from_compressed(self.octets, self.cursor).map_err(Error::InvalidOwner)?;
        let qname_end = self.cursor + qname_len;
        let qtype = read_u16(&self.octets[qname_end..])?.into();
        let qclass = read_u16(&self.octets[qname_end + 2..])?.into();
        self.cursor += qname_len + 4;
        Ok(Question {
            qname,
            qtype,
            qclass,
        })
    }
/// Reads a [`Question`] starting at the current cursor.
///
/// This method is atomic, in that the cursor is not changed on
/// failure.
Reads a [`Question`] starting at the current cursor.
This method is atomic, in that the cursor is not changed on
failure.
Reads a [ ` Question ` ] starting at the current cursor . This method is atomic in that the cursor is not changed on failure .
pub fn read_question(&mut self) -> Result<Question> {
        let (qname, qname_len) =
            Name::try_from_compressed(self.octets, self.cursor).map_err(Error::InvalidOwner)?;
        let qname_end = self.cursor + qname_len;
        let qtype = read_u16(&self.octets[qname_end..])?.into();
        let qclass = read_u16(&self.octets[qname_end + 2..])?.into();
        self.cursor += qname_len + 4;
        Ok(Question {
            qname,
            qtype,
            qclass,
        })
    }
pub fn read_question ( & mut self ) -> Result < Question > { let ( qname , qname_len ) = Name :: try_from_compressed ( self . octets , self . cursor ) . map_err ( Error :: InvalidOwner ) ? ; let qname_end = self . cursor + qname_len ; let qtype = read_u16 ( & self . octets [ qname_end .. ] ) ? . into ( ) ; let qclass = read_u16 ( & self . octets [ qname_end + 2 .. ] ) ? . into ( ) ; self . cursor += qname_len + 4 ; Ok ( Question { qname , qtype , qclass , } ) }
Reads a [`Question`] starting at the current cursor.
Reads a [ ` Question ` ] starting at the current cursor .
&mut self
&mut self