[][src]Trait domain::base::message_builder::RecordSectionBuilder

pub trait RecordSectionBuilder {
    fn push(&mut self, record: impl AsRecord) -> Result<(), ShortBuf>;
}

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

fn push(&mut self, record: impl AsRecord) -> Result<(), ShortBuf>

Appends a record to a record section.

The methods accepts anything that implements the AsRecord 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.

Loading content...

Implementors

impl<Target> RecordSectionBuilder for AdditionalBuilder<Target> where
    Target: OctetsBuilder
[src]

impl<Target> RecordSectionBuilder for AnswerBuilder<Target> where
    Target: OctetsBuilder
[src]

impl<Target: OctetsBuilder> RecordSectionBuilder for AuthorityBuilder<Target>[src]

Loading content...