pub struct ZonemdAlgorithm(/* private fields */);
Expand description
ZONEMD algorithms.
This type selects the algorithm used to hash domain names for use with the ZONEMD.
For the currently registered values see the IANA registration. This type is complete as of 2024-11-29.
Implementations§
Source§impl ZonemdAlgorithm
impl ZonemdAlgorithm
Sourcepub const SHA384: ZonemdAlgorithm
pub const SHA384: ZonemdAlgorithm
Specifies that the SHA-384 algorithm is used.
Sourcepub const SHA512: ZonemdAlgorithm
pub const SHA512: ZonemdAlgorithm
Specifies that the SHA-512 algorithm is used.
Source§impl ZonemdAlgorithm
impl ZonemdAlgorithm
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 ZonemdAlgorithm
impl ZonemdAlgorithm
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations§
Source§impl Clone for ZonemdAlgorithm
impl Clone for ZonemdAlgorithm
Source§fn clone(&self) -> ZonemdAlgorithm
fn clone(&self) -> ZonemdAlgorithm
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 ZonemdAlgorithm
impl Debug for ZonemdAlgorithm
Source§impl Display for ZonemdAlgorithm
impl Display for ZonemdAlgorithm
Source§impl<'a> From<&'a ZonemdAlgorithm> for u8
impl<'a> From<&'a ZonemdAlgorithm> for u8
Source§fn from(value: &'a ZonemdAlgorithm) -> Self
fn from(value: &'a ZonemdAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<ZonemdAlgorithm> for u8
impl From<ZonemdAlgorithm> for u8
Source§fn from(value: ZonemdAlgorithm) -> Self
fn from(value: ZonemdAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<u8> for ZonemdAlgorithm
impl From<u8> for ZonemdAlgorithm
Source§impl FromStr for ZonemdAlgorithm
impl FromStr for ZonemdAlgorithm
Source§impl Hash for ZonemdAlgorithm
impl Hash for ZonemdAlgorithm
Source§impl Ord for ZonemdAlgorithm
impl Ord for ZonemdAlgorithm
Source§fn cmp(&self, other: &ZonemdAlgorithm) -> Ordering
fn cmp(&self, other: &ZonemdAlgorithm) -> 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 ZonemdAlgorithm
impl PartialEq for ZonemdAlgorithm
Source§impl PartialOrd for ZonemdAlgorithm
impl PartialOrd for ZonemdAlgorithm
Source§impl ZonefileFmt for ZonemdAlgorithm
impl ZonefileFmt for ZonemdAlgorithm
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 ZonemdAlgorithm
impl Eq for ZonemdAlgorithm
impl StructuralPartialEq for ZonemdAlgorithm
Auto Trait Implementations§
impl Freeze for ZonemdAlgorithm
impl RefUnwindSafe for ZonemdAlgorithm
impl Send for ZonemdAlgorithm
impl Sync for ZonemdAlgorithm
impl Unpin for ZonemdAlgorithm
impl UnwindSafe for ZonemdAlgorithm
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.