pub struct Rtype(/* private fields */);
Expand description
Resource Record Types.
Each resource records has a 16 bit type value indicating what kind of information is represented by the record. Normal query includes the type of record information is requested for. A few aditional types, called query types, are defined as well and can only be used in questions. This type represents both these types.
The currently assigned values are maintained in an IANA registry. This type is complete as of 2019-01-28.
In order to avoid confusion over capitalization, the mnemonics are treated as single acronyms and therefore all variant names are spelled with an initial capital letter in accordance with the Rust naming guidelines.
Implementations§
Source§impl Rtype
impl Rtype
Sourcepub const NSAPPTR: Rtype
pub const NSAPPTR: Rtype
For domain name pointer, NSAP style.
See RFC 1348, RFC 1637, RFC 1706.
Sourcepub const NSEC3PARAM: Rtype
pub const NSEC3PARAM: Rtype
NSEC3PARAM.
See RFC 5155.
Sourcepub const OPENPGPKEY: Rtype
pub const OPENPGPKEY: Rtype
OpenPGP key.
See draft-ietf-dane-openpgpkey.
Source§impl Rtype
impl Rtype
pub const COMPOSE_LEN: u16 = 2u16
Sourcepub fn from_mnemonic(m: &[u8]) -> Option<Self>
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
Returns a value from a well-defined mnemonic.
Sourcepub const fn to_mnemonic(self) -> Option<&'static [u8]>
pub const fn to_mnemonic(self) -> Option<&'static [u8]>
Returns the mnemonic for this value if there is one.
This will also return a mnemonic if a well-defined variant
is hidden in a Int
variant.
Sourcepub const fn to_mnemonic_str(self) -> Option<&'static str>
pub const fn to_mnemonic_str(self) -> Option<&'static str>
Returns the mnemonic as a &str
for this value if there is one
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Trait Implementations§
Source§impl Ord for Rtype
impl Ord for Rtype
Source§impl PartialOrd for Rtype
impl PartialOrd for Rtype
Source§impl ZonefileFmt for Rtype
impl ZonefileFmt for Rtype
Source§fn fmt(&self, p: &mut impl Formatter) -> Result
fn fmt(&self, p: &mut impl Formatter) -> Result
fmt::Formatter
Read more