pub struct ReadRecord<'a> {
pub section: Section,
pub class: u16,
pub name: Name,
pub kind: Option<RecordType>,
pub ttl: u32,
pub cache_flush: bool,
pub data: Option<ReadData<'a>>,
}Expand description
One resource record read from a message.
The RDATA is borrowed from the message, and a name inside it — a PTR’s target, an SRV’s
host — has already been decompressed into a Name, because a pointer is meaningless
once separated from the message it points into.
Fields§
§section: SectionWhich section the record came from.
class: u16The record class, with RFC 6762 §10.2’s cache-flush bit masked off.
§8.2 compares “the record class (excluding the cache-flush bit …)” first, so the bit has to be gone before a comparison rather than after it.
name: NameThe owner name.
kind: Option<RecordType>The record type, or None for one this crate does not model.
Not an error: “Nodes SHALL silently ignore TXT record keys that they do not recognize” is the same spirit as ignoring a record type, and a responder on the link may publish anything.
ttl: u32Seconds. Zero is RFC 6762 §10.1’s goodbye — “this record is going away”.
cache_flush: boolRFC 6762 §10.2’s cache-flush bit.
data: Option<ReadData<'a>>The decoded data, for the types this crate models.