pub struct CDS { /* private fields */ }
Available on crate features
dnssec-aws-lc-rs
or dnssec-ring
only.Expand description
Child DS. See RFC 8078.
Implementations§
Source§impl CDS
impl CDS
Sourcepub fn new(
key_tag: u16,
algorithm: Option<Algorithm>,
digest_type: DigestType,
digest: Vec<u8>,
) -> Self
pub fn new( key_tag: u16, algorithm: Option<Algorithm>, digest_type: DigestType, digest: Vec<u8>, ) -> Self
Constructs a new CDS RData
§Arguments
key_tag
- the key tag associated to the DNSKEYalgorithm
- algorithm as specified in the DNSKEY, or None to request DS RRset deletiondigest_type
- hash algorithm used to validate the DNSKEYdigest
- hash of the DNSKEY
§Returns
the CDS RDATA for use in a Resource Record
Sourcepub fn algorithm(&self) -> Option<Algorithm>
pub fn algorithm(&self) -> Option<Algorithm>
Returns the Algorithm field. This is None
if deletion is requested, or the key’s algorithm
if an update is requested.
Sourcepub fn is_delete(&self) -> bool
pub fn is_delete(&self) -> bool
Returns whether this record is requesting deletion of the DS RRset.
Sourcepub fn digest_type(&self) -> DigestType
pub fn digest_type(&self) -> DigestType
Returns the Digest Type field.
Trait Implementations§
Source§impl BinEncodable for CDS
impl BinEncodable for CDS
Source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Write the type to the stream
Source§impl<'de> Deserialize<'de> for CDS
impl<'de> Deserialize<'de> for CDS
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl RecordData for CDS
impl RecordData for CDS
Source§fn try_from_rdata(data: RData) -> Result<Self, RData>
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>
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
fn record_type(&self) -> RecordType
Get the associated RecordType for the RecordData
Source§fn into_rdata(self) -> RData
fn into_rdata(self) -> RData
Converts this RecordData into generic RecordData
impl Eq for CDS
impl StructuralPartialEq for CDS
Auto Trait Implementations§
impl Freeze for CDS
impl RefUnwindSafe for CDS
impl Send for CDS
impl Sync for CDS
impl Unpin for CDS
impl UnwindSafe for CDS
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.