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§
Sourcefn ty(&self) -> u16
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
Sourcefn write_u16_len_prefixed_data(&self, out: &mut Vec<u8>)
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.