pub struct Dnskey<Octets> { /* private fields */ }
Implementations
sourceimpl<Octets> Dnskey<Octets>
impl<Octets> Dnskey<Octets>
pub fn new(flags: u16, protocol: u8, algorithm: SecAlg, public_key: Octets) -> Self
pub fn flags(&self) -> u16
pub fn protocol(&self) -> u8
pub fn algorithm(&self) -> SecAlg
pub fn public_key(&self) -> &Octets
pub fn into_public_key(self) -> Octets
pub fn convert<Other: From<Octets>>(self) -> Dnskey<Other>
sourcepub fn is_revoked(&self) -> bool
pub fn is_revoked(&self) -> bool
Returns whether the Revoke flag is set.
See RFC 5011, Section 3.
sourcepub fn is_secure_entry_point(&self) -> bool
pub fn is_secure_entry_point(&self) -> bool
Returns whether the the Secure Entry Point (SEP) flag is set.
This flag is only intended to be a hint to zone signing or debugging software as to the intended use of this DNSKEY record; validators MUST NOT alter their behavior during the signature validation process in any way based on the setting of this bit.
sourcepub fn is_zsk(&self) -> bool
pub fn is_zsk(&self) -> bool
Returns whether the Zone Key flag is set.
If the flag is not set, the key MUST NOT be used to verify RRSIGs that cover RRSETs. See RFC 4034, Section 2.1.1.
Trait Implementations
sourceimpl<Octets, Other> CanonicalOrd<Dnskey<Other>> for Dnskey<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
impl<Octets, Other> CanonicalOrd<Dnskey<Other>> for Dnskey<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
sourcefn canonical_cmp(&self, other: &Dnskey<Other>) -> Ordering
fn canonical_cmp(&self, other: &Dnskey<Other>) -> Ordering
Returns the canonical ordering between self
and other
.
sourcefn canonical_lt(&self, other: &Rhs) -> bool
fn canonical_lt(&self, other: &Rhs) -> bool
Returns whether self
is canonically less than other
.
sourcefn canonical_le(&self, other: &Rhs) -> bool
fn canonical_le(&self, other: &Rhs) -> bool
Returns whether self
is canonically less than or equal to other
.
sourcefn canonical_gt(&self, other: &Rhs) -> bool
fn canonical_gt(&self, other: &Rhs) -> bool
Returns whether self
is canonically greater than other
.
sourcefn canonical_ge(&self, other: &Rhs) -> bool
fn canonical_ge(&self, other: &Rhs) -> bool
Returns whether self
is canonically greater than or equal to other
.
sourceimpl<Octets: AsRef<[u8]>> Compose for Dnskey<Octets>
impl<Octets: AsRef<[u8]>> Compose for Dnskey<Octets>
sourcefn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the concrete representation of the value to the target. Read more
sourcefn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the canonical representation of the value to the target. Read more
sourceimpl<'de, Octets> Deserialize<'de> for Dnskey<Octets>where
Octets: FromBuilder + DeserializeOctets<'de>,
<Octets as FromBuilder>::Builder: OctetsBuilder<Octets = Octets> + EmptyBuilder,
impl<'de, Octets> Deserialize<'de> for Dnskey<Octets>where
Octets: FromBuilder + DeserializeOctets<'de>,
<Octets as FromBuilder>::Builder: OctetsBuilder<Octets = Octets> + EmptyBuilder,
sourcefn 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
sourceimpl<Octets> DnskeyExt for Dnskey<Octets>where
Octets: AsRef<[u8]>,
Available on crate feature validate
only.
impl<Octets> DnskeyExt for Dnskey<Octets>where
Octets: AsRef<[u8]>,
validate
only.sourcefn digest<N: ToDname>(
&self,
dname: &N,
algorithm: DigestAlg
) -> Result<Digest, AlgorithmError>
fn digest<N: ToDname>(
&self,
dname: &N,
algorithm: DigestAlg
) -> Result<Digest, AlgorithmError>
Calculates a digest from DNSKEY.
5.1.4. The Digest Field
The digest is calculated by concatenating the canonical form of the
fully qualified owner name of the DNSKEY RR with the DNSKEY RDATA,
and then applying the digest algorithm.
digest = digest_algorithm( DNSKEY owner name | DNSKEY RDATA);
"|" denotes concatenation
DNSKEY RDATA = Flags | Protocol | Algorithm | Public Key.
sourceimpl<O, N> From<Dnskey<O>> for AllRecordData<O, N>
impl<O, N> From<Dnskey<O>> for AllRecordData<O, N>
sourceimpl<O, N> From<Dnskey<O>> for ZoneRecordData<O, N>
impl<O, N> From<Dnskey<O>> for ZoneRecordData<O, N>
sourceimpl<Octets, SrcOctets> OctetsFrom<Dnskey<SrcOctets>> for Dnskey<Octets>where
Octets: OctetsFrom<SrcOctets>,
impl<Octets, SrcOctets> OctetsFrom<Dnskey<SrcOctets>> for Dnskey<Octets>where
Octets: OctetsFrom<SrcOctets>,
sourcefn octets_from(source: Dnskey<SrcOctets>) -> Result<Self, ShortBuf>
fn octets_from(source: Dnskey<SrcOctets>) -> Result<Self, ShortBuf>
Performs the conversion.
sourceimpl<Octets: AsRef<[u8]>> Ord for Dnskey<Octets>
impl<Octets: AsRef<[u8]>> Ord for Dnskey<Octets>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<Octets, Other> PartialEq<Dnskey<Other>> for Dnskey<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
impl<Octets, Other> PartialEq<Dnskey<Other>> for Dnskey<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
sourceimpl<Octets, Other> PartialOrd<Dnskey<Other>> for Dnskey<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
impl<Octets, Other> PartialOrd<Dnskey<Other>> for Dnskey<Octets>where
Octets: AsRef<[u8]>,
Other: AsRef<[u8]>,
sourcefn partial_cmp(&self, other: &Dnskey<Other>) -> Option<Ordering>
fn partial_cmp(&self, other: &Dnskey<Other>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Octets> RtypeRecordData for Dnskey<Octets>
impl<Octets> RtypeRecordData for Dnskey<Octets>
impl<Octets: AsRef<[u8]>> Eq for Dnskey<Octets>
Auto Trait Implementations
impl<Octets> RefUnwindSafe for Dnskey<Octets>where
Octets: RefUnwindSafe,
impl<Octets> Send for Dnskey<Octets>where
Octets: Send,
impl<Octets> Sync for Dnskey<Octets>where
Octets: Sync,
impl<Octets> Unpin for Dnskey<Octets>where
Octets: Unpin,
impl<Octets> UnwindSafe for Dnskey<Octets>where
Octets: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.
sourceimpl<Octets, T> ParseRecordData<Octets> for Twhere
T: RtypeRecordData + Parse<Octets> + Compose,
impl<Octets, T> ParseRecordData<Octets> for Twhere
T: RtypeRecordData + Parse<Octets> + Compose,
sourcefn parse_data(
rtype: Rtype,
parser: &mut Parser<Octets>
) -> Result<Option<T>, ParseError>
fn parse_data(
rtype: Rtype,
parser: &mut Parser<Octets>
) -> Result<Option<T>, ParseError>
Parses the record data. Read more