Module domain::bits::rdata [−][src]
Basic resource 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 concrete types implement
RecordData
. Types that can be parsed out of messages also implement
ParsedRecordData
. 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
].
All concrete types shipped with this crate are implemented in the
domain::rdata
module.
In order to walk over all resource records in a message or work with
unknown record types, this module also defines the GenericRecordData
type that can deal with all record types but provides only a limited
functionality.
Structs
GenericRecordData |
A type for parsing any type of record data. |
Traits
ParsedRecordData |
A trait for types that allow parsing record data from a message. |
RecordData |
A trait for types representing record data. |