pub fn add_answer_rr(
        &mut self,
        owner: &Name,
        rr_type: Type,
        class: Class,
        ttl: Ttl,
        rdata: &Rdata,
    ) -> Result<()> {
        self.with_rollback(|this| {
            this.change_section_to_answer()?;
            this.add_rr(owner, rr_type, class, ttl, rdata)?;
            if let Some(new_ancount) = this.ancount.checked_add(1) {
                this.ancount = new_ancount;
                Ok(())
            } else {
                Err(Error::CountOverflow)
            }
        })
    }
/// Adds a resource record 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 a resource record 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 a resource record 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_rr(
        &mut self,
        owner: &Name,
        rr_type: Type,
        class: Class,
        ttl: Ttl,
        rdata: &Rdata,
    ) -> Result<()> {
        self.with_rollback(|this| {
            this.change_section_to_answer()?;
            this.add_rr(owner, rr_type, class, ttl, rdata)?;
            if let Some(new_ancount) = this.ancount.checked_add(1) {
                this.ancount = new_ancount;
                Ok(())
            } else {
                Err(Error::CountOverflow)
            }
        })
    }
pub fn add_answer_rr ( & mut self , owner : & Name , rr_type : Type , class : Class , ttl : Ttl , rdata : & Rdata , ) -> Result < ( ) > { self . with_rollback ( | this | { this . change_section_to_answer ( ) ? ; this . add_rr ( owner , rr_type , class , ttl , rdata ) ? ; if let Some ( new_ancount ) = this . ancount . checked_add ( 1 ) { this . ancount = new_ancount ; Ok ( ( ) ) } else { Err ( Error :: CountOverflow ) } } ) }
Adds a resource record to the answer section of the message.
Adds a resource record to the answer section of the message .
&mut self
owner
&Name
rr_type
Type
class
Class
ttl
Ttl
rdata
&Rdata
&mut self
owner
&Name
rr_type
Type
class
Class
ttl
Ttl
rdata
&Rdata