pub fn add_answer_rrset(&mut self, owner: &Name, rrset: &Rrset) -> Result<()> {
        self.with_rollback(|this| {
            this.change_section_to_answer()?;
            let n_added = this.add_rrset(owner, rrset)?;
            if n_added > u16::MAX as usize {
                Err(Error::CountOverflow)
            } else if let Some(new_ancount) = this.ancount.checked_add(n_added as u16) {
                this.ancount = new_ancount;
                Ok(())
            } else {
                Err(Error::CountOverflow)
            }
        })
    }
/// Adds an RRset to the answer section of the message. This must be
/// used after any questions are added and before RRs are added to
/// any other section.
Adds an RRset to the answer section of the message. This must be
used after any questions are added and before RRs are added to
any other section.
Adds an RRset to the answer section of the message . This must be used after any questions are added and before RRs are added to any other section .
pub fn add_answer_rrset(&mut self, owner: &Name, rrset: &Rrset) -> Result<()> {
        self.with_rollback(|this| {
            this.change_section_to_answer()?;
            let n_added = this.add_rrset(owner, rrset)?;
            if n_added > u16::MAX as usize {
                Err(Error::CountOverflow)
            } else if let Some(new_ancount) = this.ancount.checked_add(n_added as u16) {
                this.ancount = new_ancount;
                Ok(())
            } else {
                Err(Error::CountOverflow)
            }
        })
    }
pub fn add_answer_rrset ( & mut self , owner : & Name , rrset : & Rrset ) -> Result < ( ) > { self . with_rollback ( | this | { this . change_section_to_answer ( ) ? ; let n_added = this . add_rrset ( owner , rrset ) ? ; if n_added > u16 :: MAX as usize { Err ( Error :: CountOverflow ) } else if let Some ( new_ancount ) = this . ancount . checked_add ( n_added as u16 ) { this . ancount = new_ancount ; Ok ( ( ) ) } else { Err ( Error :: CountOverflow ) } } ) }
Adds an RRset to the answer section of the message.
Adds an RRset to the answer section of the message .
&mut self
owner
&Name
rrset
&Rrset
&mut self
owner
&Name
rrset
&Rrset