Expand description
Resource record data handling.
DNS resource records consist of some common data defining the domain
name they pertain to, their type and class, and finally record data
the format of which depends on the specific record type. As there are
currently more than eighty record types, having a giant enum for record
data seemed like a bad idea. Instead, resource records are generic over
two traits defined by this module. All types representimg resource record
data implement RecordData. Types that can be parsed out of messages
also implement ParseRecordData. This distinction is only relevant for
types that contain and are generic over domain names: for these, parsing
is only available if the names use [ParsedDname].
While RecordData allows types to provide different record types for
different values, most types actually implement one specific record type.
For these types, implementing RtypeRecordData provides a shortcut to
implementin both RecordData and [ParseRecordDate] with a constant
record type.
All such implementations for a specific record type shipped with the
domain crate are collected in the domain::rdata module.
A type implementing the traits for any record type is available in here
too: UnknownRecordData. It stores the actual record data in its
encoded form in a bytes value.
Structs§
- Unknown
Record Data - A type for parsing any type of record data.
Traits§
- Parse
Record Data - A record data type that can be parsed from a message.
- Record
Data - A type that represents record data.
- Rtype
Record Data - A type for record data for a single specific record type.