pub struct Nsec3HashAlgorithm(/* private fields */);
Expand description
NSEC3 hash algorithm numbers.
This type selects the algorithm used to hash domain names for use with the NSEC3.
For the currently registered values see the IANA registration. This type is complete as of 2008-03-05.
Implementations§
Source§impl Nsec3HashAlgorithm
impl Nsec3HashAlgorithm
Sourcepub const SHA1: Nsec3HashAlgorithm
pub const SHA1: Nsec3HashAlgorithm
Specifies that the SHA-1 hash function is used.
Source§impl Nsec3HashAlgorithm
impl Nsec3HashAlgorithm
pub const COMPOSE_LEN: u16 = 1u16
Sourcepub fn from_mnemonic(m: &[u8]) -> Option<Self>
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
Returns a value from a well-defined mnemonic.
Sourcepub const fn to_mnemonic(self) -> Option<&'static [u8]>
pub const fn to_mnemonic(self) -> Option<&'static [u8]>
Returns the mnemonic for this value if there is one.
This will also return a mnemonic if a well-defined variant
is hidden in a Int
variant.
Sourcepub const fn to_mnemonic_str(self) -> Option<&'static str>
pub const fn to_mnemonic_str(self) -> Option<&'static str>
Returns the mnemonic as a &str
for this value if there is one
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Source§impl Nsec3HashAlgorithm
impl Nsec3HashAlgorithm
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations§
Source§impl Clone for Nsec3HashAlgorithm
impl Clone for Nsec3HashAlgorithm
Source§fn clone(&self) -> Nsec3HashAlgorithm
fn clone(&self) -> Nsec3HashAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Nsec3HashAlgorithm
impl Debug for Nsec3HashAlgorithm
Source§impl Display for Nsec3HashAlgorithm
impl Display for Nsec3HashAlgorithm
Source§impl<'a> From<&'a Nsec3HashAlgorithm> for u8
impl<'a> From<&'a Nsec3HashAlgorithm> for u8
Source§fn from(value: &'a Nsec3HashAlgorithm) -> Self
fn from(value: &'a Nsec3HashAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<Nsec3HashAlgorithm> for u8
impl From<Nsec3HashAlgorithm> for u8
Source§fn from(value: Nsec3HashAlgorithm) -> Self
fn from(value: Nsec3HashAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<u8> for Nsec3HashAlgorithm
impl From<u8> for Nsec3HashAlgorithm
Source§impl FromStr for Nsec3HashAlgorithm
impl FromStr for Nsec3HashAlgorithm
Source§impl Hash for Nsec3HashAlgorithm
impl Hash for Nsec3HashAlgorithm
Source§impl Ord for Nsec3HashAlgorithm
impl Ord for Nsec3HashAlgorithm
Source§fn cmp(&self, other: &Nsec3HashAlgorithm) -> Ordering
fn cmp(&self, other: &Nsec3HashAlgorithm) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Nsec3HashAlgorithm
impl PartialEq for Nsec3HashAlgorithm
Source§impl PartialOrd for Nsec3HashAlgorithm
impl PartialOrd for Nsec3HashAlgorithm
Source§impl ZonefileFmt for Nsec3HashAlgorithm
impl ZonefileFmt for Nsec3HashAlgorithm
Source§fn fmt(&self, p: &mut impl Formatter) -> Result
fn fmt(&self, p: &mut impl Formatter) -> Result
Format the item as zonefile fmt into a
fmt::Formatter
Read moreSource§fn display_zonefile(
&self,
display_kind: DisplayKind,
) -> ZoneFileDisplay<'_, Self>
fn display_zonefile( &self, display_kind: DisplayKind, ) -> ZoneFileDisplay<'_, Self>
Display the item as a zonefile Read more
impl Copy for Nsec3HashAlgorithm
impl Eq for Nsec3HashAlgorithm
impl StructuralPartialEq for Nsec3HashAlgorithm
Auto Trait Implementations§
impl Freeze for Nsec3HashAlgorithm
impl RefUnwindSafe for Nsec3HashAlgorithm
impl Send for Nsec3HashAlgorithm
impl Sync for Nsec3HashAlgorithm
impl Unpin for Nsec3HashAlgorithm
impl UnwindSafe for Nsec3HashAlgorithm
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<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.