Skip to main content

Module message

Module message 

Source
Expand description

Zero-copy message views (RFC 1035 §4.1).

Message::parse checks only the 12-byte header; the four sections are decoded lazily by iterators that yield Result<Question> / Result<Record>, checking each entry and the section counts as they go. Callers that prefer to fail fast can call Message::validate (or Message::parse_validated) first, which walks the whole message once and reports the first error.

Structs§

AllRecords
Iterator over all resource records with their section; see Message::records.
Message
A parsed DNS message: a view over the caller’s buffer.
Question
An entry of the question section (RFC 1035 §4.1.2).
Questions
Iterator over the question section; see Message::questions.
Record
A resource record (RFC 1035 §4.1.3), viewed in place.
Records
Iterator over the records of one section; see Message::section.

Enums§

Section
The four message sections, in wire order (RFC 1035 §4.1).