domain::base::record

Trait 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§

source

fn compose_record<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: ComposeRecord> ComposeRecord for &'a T

source§

fn compose_record<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

source§

impl<Name, Data> ComposeRecord for (Name, u32, Data)
where Name: ToName, Data: ComposeRecordData,

source§

fn compose_record<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

source§

impl<Name, Data> ComposeRecord for (Name, Class, u32, Data)
where Name: ToName, Data: ComposeRecordData,

source§

fn compose_record<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

source§

impl<Name, Data> ComposeRecord for (Name, Class, Ttl, Data)
where Name: ToName, Data: ComposeRecordData,

source§

fn compose_record<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

source§

impl<Name, Data> ComposeRecord for (Name, Ttl, Data)
where Name: ToName, Data: ComposeRecordData,

source§

fn compose_record<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

Implementors§

source§

impl<Name, Data> ComposeRecord for Record<Name, Data>
where Name: ToName, Data: ComposeRecordData,