pub struct Dnskey<Octs> { /* private fields */ }
Implementations§
source§impl<Octs> Dnskey<Octs>
impl<Octs> Dnskey<Octs>
pub fn new( flags: u16, protocol: u8, algorithm: SecAlg, public_key: Octs, ) -> Result<Self, LongRecordData>
sourcepub unsafe fn new_unchecked(
flags: u16,
protocol: u8,
algorithm: SecAlg,
public_key: Octs,
) -> Self
pub unsafe fn new_unchecked( flags: u16, protocol: u8, algorithm: SecAlg, public_key: Octs, ) -> Self
Creates new DNSKEY record data without checking.
§Safety
The caller needs to ensure that wire format representation of the record data is at most 65,535 octets long.
pub fn flags(&self) -> u16
pub fn protocol(&self) -> u8
pub fn algorithm(&self) -> SecAlg
pub fn public_key(&self) -> &Octs
pub fn into_public_key(self) -> Octs
pub fn convert<Other: From<Octs>>(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_zone_key(&self) -> bool
pub fn is_zone_key(&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.
pub fn parse<'a, Src: Octets<Range<'a> = Octs> + ?Sized>( parser: &mut Parser<'a, Src>, ) -> Result<Self, ParseError>
pub fn scan<S: Scanner<Octets = Octs>>( scanner: &mut S, ) -> Result<Self, S::Error>
Trait Implementations§
source§impl<Octs, Other> CanonicalOrd<Dnskey<Other>> for Dnskey<Octs>
impl<Octs, Other> CanonicalOrd<Dnskey<Other>> for Dnskey<Octs>
source§fn canonical_cmp(&self, other: &Dnskey<Other>) -> Ordering
fn canonical_cmp(&self, other: &Dnskey<Other>) -> Ordering
Returns the canonical ordering between
self
and other
.source§fn canonical_lt(&self, other: &Rhs) -> bool
fn canonical_lt(&self, other: &Rhs) -> bool
Returns whether
self
is canonically less than other
.source§fn canonical_le(&self, other: &Rhs) -> bool
fn canonical_le(&self, other: &Rhs) -> bool
Returns whether
self
is canonically less than or equal to other
.source§fn canonical_gt(&self, other: &Rhs) -> bool
fn canonical_gt(&self, other: &Rhs) -> bool
Returns whether
self
is canonically greater than other
.source§fn canonical_ge(&self, other: &Rhs) -> bool
fn canonical_ge(&self, other: &Rhs) -> bool
Returns whether
self
is canonically greater than or equal to other
.source§impl<Octs: AsRef<[u8]>> ComposeRecordData for Dnskey<Octs>
impl<Octs: AsRef<[u8]>> ComposeRecordData for Dnskey<Octs>
source§fn rdlen(&self, _compress: bool) -> Option<u16>
fn rdlen(&self, _compress: bool) -> Option<u16>
Returns the length of the record data if available. Read more
source§fn compose_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the wire format of the record data into
target
.source§fn compose_canonical_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_canonical_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the canonical wire format of the record data into
target
.source§fn compose_len_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the record data prefixed with its length.
source§fn compose_canonical_len_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_canonical_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the record data prefixed with its length.
source§impl<O, N> From<Dnskey<O>> for AllRecordData<O, N>
impl<O, N> From<Dnskey<O>> for AllRecordData<O, N>
source§impl<O, N> From<Dnskey<O>> for ZoneRecordData<O, N>
impl<O, N> From<Dnskey<O>> for ZoneRecordData<O, N>
source§impl<Octs, SrcOcts> OctetsFrom<Dnskey<SrcOcts>> for Dnskey<Octs>where
Octs: OctetsFrom<SrcOcts>,
impl<Octs, SrcOcts> OctetsFrom<Dnskey<SrcOcts>> for Dnskey<Octs>where
Octs: OctetsFrom<SrcOcts>,
source§impl<Octs: AsRef<[u8]>> Ord for Dnskey<Octs>
impl<Octs: AsRef<[u8]>> Ord for Dnskey<Octs>
source§impl<'a, Octs> ParseRecordData<'a, Octs> for Dnskey<Octs::Range<'a>>
impl<'a, Octs> ParseRecordData<'a, Octs> for Dnskey<Octs::Range<'a>>
source§fn parse_rdata(
rtype: Rtype,
parser: &mut Parser<'a, Octs>,
) -> Result<Option<Self>, ParseError>
fn parse_rdata( rtype: Rtype, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>
Parses the record data. Read more
source§impl<Octs, Other> PartialOrd<Dnskey<Other>> for Dnskey<Octs>
impl<Octs, Other> PartialOrd<Dnskey<Other>> for Dnskey<Octs>
source§impl<Octs> RecordData for Dnskey<Octs>
impl<Octs> RecordData for Dnskey<Octs>
impl<Octs: AsRef<[u8]>> Eq for Dnskey<Octs>
Auto Trait Implementations§
impl<Octs> Freeze for Dnskey<Octs>where
Octs: Freeze,
impl<Octs> RefUnwindSafe for Dnskey<Octs>where
Octs: RefUnwindSafe,
impl<Octs> Send for Dnskey<Octs>where
Octs: Send,
impl<Octs> Sync for Dnskey<Octs>where
Octs: Sync,
impl<Octs> Unpin for Dnskey<Octs>where
Octs: Unpin,
impl<Octs> UnwindSafe for Dnskey<Octs>where
Octs: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.