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 = <u8 as crate::base::wire::Compose>::COMPOSE_LEN
Sourcepub const fn from_int(value: u8) -> Nsec3HashAlgorithm
pub const fn from_int(value: u8) -> Nsec3HashAlgorithm
Returns a value from its raw integer value.
Sourcepub fn from_mnemonic(m: &[u8]) -> Option<Nsec3HashAlgorithm>
pub fn from_mnemonic(m: &[u8]) -> Option<Nsec3HashAlgorithm>
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>( parser: &mut Parser<'a, Octs>, ) -> Result<Nsec3HashAlgorithm, ParseError>
pub fn compose<Target>(
&self,
target: &mut Target,
) -> Result<(), <Target as OctetsBuilder>::AppendError>where
Target: OctetsBuilder + ?Sized,
Source§impl Nsec3HashAlgorithm
impl Nsec3HashAlgorithm
pub fn from_bytes(bytes: &[u8]) -> Option<Nsec3HashAlgorithm>
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Nsec3HashAlgorithm
Source§impl Debug for Nsec3HashAlgorithm
impl Debug for Nsec3HashAlgorithm
Source§impl Display for Nsec3HashAlgorithm
impl Display for Nsec3HashAlgorithm
impl Eq for Nsec3HashAlgorithm
Source§impl<'a> From<&'a Nsec3HashAlgorithm> for u8
impl<'a> From<&'a Nsec3HashAlgorithm> for u8
Source§fn from(value: &'a Nsec3HashAlgorithm) -> u8
fn from(value: &'a Nsec3HashAlgorithm) -> u8
Converts to this type from the input type.
Source§impl From<Nsec3HashAlgorithm> for u8
impl From<Nsec3HashAlgorithm> for u8
Source§fn from(value: Nsec3HashAlgorithm) -> u8
fn from(value: Nsec3HashAlgorithm) -> u8
Converts to this type from the input type.
Source§impl From<u8> for Nsec3HashAlgorithm
impl From<u8> for Nsec3HashAlgorithm
Source§fn from(value: u8) -> Nsec3HashAlgorithm
fn from(value: u8) -> Nsec3HashAlgorithm
Converts to this type from the input type.
Source§impl FromStr for Nsec3HashAlgorithm
impl FromStr for Nsec3HashAlgorithm
Source§type Err = ParseIntError
type Err = ParseIntError
The associated error which can be returned from parsing.
Source§fn from_str(
s: &str,
) -> Result<Nsec3HashAlgorithm, <Nsec3HashAlgorithm as FromStr>::Err>
fn from_str( s: &str, ) -> Result<Nsec3HashAlgorithm, <Nsec3HashAlgorithm as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§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 (const: unstable) · 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§fn eq(&self, other: &Nsec3HashAlgorithm) -> bool
fn eq(&self, other: &Nsec3HashAlgorithm) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for Nsec3HashAlgorithm
impl PartialOrd for Nsec3HashAlgorithm
impl StructuralPartialEq for Nsec3HashAlgorithm
Source§impl ZonefileFmt for Nsec3HashAlgorithm
impl ZonefileFmt for Nsec3HashAlgorithm
Source§fn fmt(&self, p: &mut impl Formatter) -> Result<(), Error>
fn fmt(&self, p: &mut impl Formatter) -> Result<(), Error>
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
Auto Trait Implementations§
impl Freeze for Nsec3HashAlgorithm
impl RefUnwindSafe for Nsec3HashAlgorithm
impl Send for Nsec3HashAlgorithm
impl Sync for Nsec3HashAlgorithm
impl Unpin for Nsec3HashAlgorithm
impl UnsafeUnpin 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<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.