Trait domain::base::record::ComposeRecord
source · pub trait ComposeRecord {
// Required method
fn compose_record<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>;
}
Expand description
A helper trait allowing construction of records on the fly.
The trait’s primary users arer the three record section buider type of
the [message builder] system. Their push
methods accept anything that
implements this trait.
Implementations are provided for Record
values and references. In
addition, a tuple of a domain name, class, TTL, and record data can be
used as this trait, saving the detour of constructing a record first.
Since the class is pretty much always Class::In
, it can be left out in
this case.
Required Methods§
fn compose_record<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Object Safety§
This trait is not object safe.