Enum RecordType
#[non_exhaustive]pub enum RecordType {
Show 38 variants
A,
AAAA,
ANAME,
ANY,
AXFR,
CAA,
CDS,
CDNSKEY,
CERT,
CNAME,
CSYNC,
DNSKEY,
DS,
HINFO,
HTTPS,
IXFR,
KEY,
MX,
NAPTR,
NS,
NSEC,
NSEC3,
NSEC3PARAM,
NULL,
OPENPGPKEY,
OPT,
PTR,
RRSIG,
SIG,
SOA,
SRV,
SSHFP,
SVCB,
TLSA,
TSIG,
TXT,
Unknown(u16),
ZERO,
}Expand description
The type of the resource record.
This specifies the type of data in the RData field of the Resource Record
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
A
RFC 1035 IPv4 Address record
AAAA
RFC 3596 IPv6 address record
ANAME
ANY
RFC 1035 All cached records, aka ANY
AXFR
RFC 1035 Authoritative Zone Transfer
CAA
RFC 6844 Certification Authority Authorization
CDS
RFC 7344 Child DS
CDNSKEY
RFC 7344 Child DNSKEY
CERT
RFC 4398 Storing Certificates in the Domain Name System (DNS)
CNAME
RFC 1035 Canonical name record
CSYNC
RFC 7477 Child-to-parent synchronization record
DNSKEY
RFC 4034 DNS Key record: RSASHA256 and RSASHA512, RFC5702
DS
RFC 4034 Delegation signer: RSASHA256 and RSASHA512, RFC5702
HINFO
RFC 1035 host information
HTTPS
RFC 9460 DNS SVCB and HTTPS RRs
IXFR
RFC 1996 Incremental Zone Transfer
KEY
MX
RFC 1035 Mail exchange record
NAPTR
RFC 3403 Naming Authority Pointer
NS
RFC 1035 Name server record
NSEC
RFC 4034 Next-Secure record
NSEC3
RFC 5155 NSEC record version 3
NSEC3PARAM
RFC 5155 NSEC3 parameters
NULL
RFC 1035 Null server record, for testing
OPENPGPKEY
RFC 7929 OpenPGP public key
OPT
RFC 6891 Option
PTR
RFC 1035 Pointer record
RRSIG
RFC 4034 DNSSEC signature: RSASHA256 and RSASHA512, RFC5702
SIG
SOA
SRV
RFC 2782 Service locator
SSHFP
RFC 4255 SSH Public Key Fingerprint
SVCB
RFC 9460 DNS SVCB and HTTPS RRs
TLSA
RFC 6698 TLSA certificate association
TSIG
RFC 8945 Transaction Signature
TXT
RFC 1035 Text record
Unknown(u16)
Unknown Record type, or unsupported
ZERO
This corresponds to a record type of 0, unspecified
Implementations§
§impl RecordType
impl RecordType
pub fn is_ip_addr(self) -> bool
pub fn is_ip_addr(self) -> bool
Returns true if this is an A or an AAAA record
Trait Implementations§
§impl BinDecodable<'_> for RecordType
impl BinDecodable<'_> for RecordType
§fn read(decoder: &mut BinDecoder<'_>) -> Result<RecordType, ProtoError>
fn read(decoder: &mut BinDecoder<'_>) -> Result<RecordType, ProtoError>
§fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
§impl BinEncodable for RecordType
impl BinEncodable for RecordType
§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
§impl Clone for RecordType
impl Clone for RecordType
§fn clone(&self) -> RecordType
fn clone(&self) -> RecordType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for RecordType
impl Debug for RecordType
§impl Display for RecordType
impl Display for RecordType
§impl From<RecordType> for &'static str
Convert from RecordType to &str
impl From<RecordType> for &'static str
Convert from RecordType to &str
use hickory_proto::rr::record_type::RecordType;
let var: &'static str = From::from(RecordType::A);
assert_eq!("A", var);
let var: &'static str = RecordType::A.into();
assert_eq!("A", var);§fn from(rt: RecordType) -> &'static str
fn from(rt: RecordType) -> &'static str
§impl From<RecordType> for u16
Convert from RecordType to u16
impl From<RecordType> for u16
Convert from RecordType to u16
use hickory_proto::rr::record_type::RecordType;
let var: u16 = RecordType::A.into();
assert_eq!(1, var);§fn from(rt: RecordType) -> u16
fn from(rt: RecordType) -> u16
§impl From<u16> for RecordType
impl From<u16> for RecordType
§fn from(value: u16) -> RecordType
fn from(value: u16) -> RecordType
Convert from u16 to RecordType
use hickory_proto::rr::record_type::RecordType;
let var = RecordType::from(1);
assert_eq!(RecordType::A, var);§impl FromStr for RecordType
impl FromStr for RecordType
§fn from_str(str: &str) -> Result<RecordType, ProtoError>
fn from_str(str: &str) -> Result<RecordType, ProtoError>
Convert &str to RecordType
use std::str::FromStr;
use hickory_proto::rr::record_type::RecordType;
let var: RecordType = RecordType::from_str("A").unwrap();
assert_eq!(RecordType::A, var);§type Err = ProtoError
type Err = ProtoError
§impl Hash for RecordType
impl Hash for RecordType
§impl Ord for RecordType
impl Ord for RecordType
§impl PartialEq for RecordType
impl PartialEq for RecordType
§impl PartialOrd for RecordType
impl PartialOrd for RecordType
impl Copy for RecordType
impl Eq for RecordType
impl StructuralPartialEq for RecordType
Auto Trait Implementations§
impl Freeze for RecordType
impl RefUnwindSafe for RecordType
impl Send for RecordType
impl Sync for RecordType
impl Unpin for RecordType
impl UnwindSafe for RecordType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.