pub trait RecordSectionBuilder<Target: Composer> {
    // Required method
    fn push(&mut self, record: impl ComposeRecord) -> Result<(), PushError>;
}
Expand description

A section that can have records pushed to it.

This trait exists to make it possible to write code that works for all three record sections. It basically just duplicates the push method of these sections.

(This method is available on the sections as a method, too, so you don’t need to import the RecordSectionBuilder all the time.)

Required Methods§

source

fn push(&mut self, record: impl ComposeRecord) -> Result<(), PushError>

Appends a record to a record section.

The methods accepts anything that implements the ComposeRecord trait. Apart from record values and references, this are tuples of the owner domain name, optionally the class (which is taken to be IN if missing), the TTL, and record data.

Implementors§

source§

impl<Target> RecordSectionBuilder<Target> for AdditionalBuilder<Target>where Target: Composer,

source§

impl<Target> RecordSectionBuilder<Target> for AnswerBuilder<Target>where Target: Composer,

source§

impl<Target: Composer> RecordSectionBuilder<Target> for AuthorityBuilder<Target>