1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//! Record Data of Well-defined Record Types
//!
//! This module will eventually contain implementations for the record data
//! of all defined resource record types.
//!
//! The types are named identically to the
//! [`domain::base::iana::Rtype`][crate::base::iana::Rtype] variant they
//! implement. They are grouped into submodules for the RFCs they are defined
//! in. All types are also re-exported at the top level here. Ie., for the
//! AAAA record type, you can simple `use domain::rdata::Aaaa` instead of
//! `use domain::rdata::rfc3596::Aaaa` which nobody could possibly
//! remember. There are, however, some helper data types defined here and
//! there which are not re-exported to keep things somewhat tidy.
//!
//! See the [`domain::base::iana::Rtype`][crate::base::iana::Rtype] enum for
//! the complete set of record types and, consequently, those types that are
//! still missing.
//!
//! In addition, the module provides two enums combining the known types.
//! [`AllRecordData`] indeed contains all record data types known plus
//! [`UnknownRecordData`][crate::base::rdata::UnknownRecordData] for the
//! rest, while [`ZoneRecordData`] only
//! contains those types that can appear in zone files plus, again,
//! [`UnknownRecordData`][crate::base::rdata::UnknownRecordData] for
//! everything else.
// The rdata_types! macro (defined in self::macros) re-exports the record data
// types here and creates the ZoneRecordData and AllRecordData enums
// containing all record types that can appear in a zone and all record
// types that exist.
//
// All record data types listed here MUST have the same name as the
// `Rtype` variant they implement – some of the code implemented by the macro
// relies on that.
//
// Add any new module here and then add all record types in that module that
// can appear in zone files under "zone" and all others under "pseudo".
// Your type can be generic over an octet type "O" and a domain name type "N".
// Add these as needed.
//
// Each type entry has to be followed by a comma, even the last one. The macro
// is messy enough as it is ...
rdata_types!