pub trait RecordSectionBuilder: SectionBuilder {
// Required method
fn push<N, D, R>(&mut self, record: R) -> Result<(), ShortBuf>
where N: ToDname,
D: RecordData,
R: Into<Record<N, D>>;
}
Expand description
Trait for pushing resource records into a section
Required Methods§
Sourcefn push<N, D, R>(&mut self, record: R) -> Result<(), ShortBuf>
fn push<N, D, R>(&mut self, record: R) -> Result<(), ShortBuf>
Appends a new resource record to the section.
This method is generic over anything that can be converted into a
Record
. In particular, you can use four-tuples consisting of
a domain name, class, TTL, and record data or triples leaving out
the class which will then be assumed to be Class::In
.
If appending the record would result in the message exceeding its size limit, the method will fail.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.