Trait Record

Source
pub trait Record: Ord {
    // Required methods
    fn ty(&self) -> u16;
    fn name(&self) -> &Name;
    fn json(&self) -> String;
    fn write_u16_len_prefixed_data(&self, out: &mut Vec<u8>);
}
Expand description

A trait describing a resource record (including the RR enum).

Required Methods§

Source

fn ty(&self) -> u16

The resource record type, as maintained by IANA.

Current assignments can be found at http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4

Source

fn name(&self) -> &Name

The name this record is at.

Source

fn json(&self) -> String

Gets a JSON encoding of this record.

Source

fn write_u16_len_prefixed_data(&self, out: &mut Vec<u8>)

Writes the data of this record, prefixed by a u16 length, to the given Vec.

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.

Implementors§

Source§

impl Record for RR

Source§

impl<RR: StaticRecord> Record for RR