Trait hickory_proto::rr::RecordData

source ·
pub trait RecordData:
    Clone
    + Sized
    + PartialEq
    + Eq
    + Display
    + Debug
    + BinEncodable {
    // Required methods
    fn try_from_rdata(data: RData) -> Result<Self, RData>;
    fn try_borrow(data: &RData) -> Option<&Self>;
    fn record_type(&self) -> RecordType;
    fn into_rdata(self) -> RData;

    // Provided method
    fn is_update(&self) -> bool { ... }
}
Expand description

RecordData that is stored in a DNS Record.

This trait allows for generic usage of RecordData types inside the Record type. Specific RecordData types can be used to enforce compile time constraints on a Record.

Required Methods§

source

fn try_from_rdata(data: RData) -> Result<Self, RData>

Attempts to convert to this RecordData from the RData type, if it is not the correct type the original is returned

source

fn try_borrow(data: &RData) -> Option<&Self>

Attempts to borrow this RecordData from the RData type, if it is not the correct type the original is returned

source

fn record_type(&self) -> RecordType

Get the associated RecordType for the RecordData

source

fn into_rdata(self) -> RData

Converts this RecordData into generic RecordData

Provided Methods§

source

fn is_update(&self) -> bool

RDLENGTH = 0

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RecordData for RData

source§

impl RecordData for CDNSKEY

Available on crate feature dnssec only.
source§

impl RecordData for CDS

Available on crate feature dnssec only.
source§

impl RecordData for DNSKEY

Available on crate feature dnssec only.
source§

impl RecordData for DS

Available on crate feature dnssec only.
source§

impl RecordData for KEY

Available on crate feature dnssec only.
source§

impl RecordData for NSEC3

Available on crate feature dnssec only.
source§

impl RecordData for NSEC3PARAM

Available on crate feature dnssec only.
source§

impl RecordData for NSEC

Available on crate feature dnssec only.
source§

impl RecordData for RRSIG

Available on crate feature dnssec only.
source§

impl RecordData for SIG

Available on crate feature dnssec only.
source§

impl RecordData for TSIG

Available on crate feature dnssec only.
source§

impl RecordData for A

source§

impl RecordData for AAAA

source§

impl RecordData for CAA

source§

impl RecordData for CSYNC

source§

impl RecordData for HINFO

source§

impl RecordData for HTTPS

source§

impl RecordData for MX

source§

impl RecordData for ANAME

source§

impl RecordData for CNAME

source§

impl RecordData for NS

source§

impl RecordData for PTR

source§

impl RecordData for NAPTR

source§

impl RecordData for NULL

source§

impl RecordData for OPENPGPKEY

source§

impl RecordData for OPT

source§

impl RecordData for SOA

source§

impl RecordData for SRV

source§

impl RecordData for SSHFP

source§

impl RecordData for SVCB

source§

impl RecordData for TLSA

source§

impl RecordData for TXT