pub struct DigestAlgorithm(/* private fields */);Expand description
Delegation signer digest algorithm numbers.
These numbers are used in the DS resource record to specify how the key digest in the record has been generated.
For the currently registered values see the IANA registration. This type is complete as of the registry update of 2012-04-13.
Implementations§
Source§impl DigestAlgorithm
impl DigestAlgorithm
Sourcepub const SHA1: DigestAlgorithm
pub const SHA1: DigestAlgorithm
Specifies that the SHA-1 hash function is used.
Implementation of this function is currently mandatory.
Sourcepub const SHA256: DigestAlgorithm
pub const SHA256: DigestAlgorithm
Specifies that the SHA-256 hash function is used.
Implementation of this function is currently mandatory.
Sourcepub const GOST: DigestAlgorithm
pub const GOST: DigestAlgorithm
Specifies that the GOST R 34.11-94 hash function is used.
Use of this hash function is described in RFC 5933. Implementing the function is optional.
Sourcepub const SHA384: DigestAlgorithm
pub const SHA384: DigestAlgorithm
Specifies that the SHA-384 hash function is used.
Use of this hash function is described in RFC 6605. Implementing the function is optional.
Source§impl DigestAlgorithm
impl DigestAlgorithm
pub const COMPOSE_LEN: u16 = <u8 as crate::base::wire::Compose>::COMPOSE_LEN
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 DigestAlgorithm
impl DigestAlgorithm
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for DigestAlgorithm
impl<'arbitrary> Arbitrary<'arbitrary> for DigestAlgorithm
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for DigestAlgorithm
impl Clone for DigestAlgorithm
Source§fn clone(&self) -> DigestAlgorithm
fn clone(&self) -> DigestAlgorithm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DigestAlgorithm
Source§impl Debug for DigestAlgorithm
impl Debug for DigestAlgorithm
Source§impl<'de> Deserialize<'de> for DigestAlgorithm
Available on crate feature serde only.
impl<'de> Deserialize<'de> for DigestAlgorithm
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for DigestAlgorithm
impl Display for DigestAlgorithm
impl Eq for DigestAlgorithm
Source§impl<'a> From<&'a DigestAlgorithm> for u8
impl<'a> From<&'a DigestAlgorithm> for u8
Source§fn from(value: &'a DigestAlgorithm) -> Self
fn from(value: &'a DigestAlgorithm) -> Self
Source§impl From<DigestAlgorithm> for u8
impl From<DigestAlgorithm> for u8
Source§fn from(value: DigestAlgorithm) -> Self
fn from(value: DigestAlgorithm) -> Self
Source§impl From<u8> for DigestAlgorithm
impl From<u8> for DigestAlgorithm
Source§impl FromStr for DigestAlgorithm
impl FromStr for DigestAlgorithm
Source§impl Hash for DigestAlgorithm
impl Hash for DigestAlgorithm
Source§impl Ord for DigestAlgorithm
impl Ord for DigestAlgorithm
Source§fn cmp(&self, other: &DigestAlgorithm) -> Ordering
fn cmp(&self, other: &DigestAlgorithm) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DigestAlgorithm
impl PartialEq for DigestAlgorithm
Source§impl PartialOrd for DigestAlgorithm
impl PartialOrd for DigestAlgorithm
Source§impl Serialize for DigestAlgorithm
Available on crate feature serde only.
impl Serialize for DigestAlgorithm
serde only.impl StructuralPartialEq for DigestAlgorithm
Source§impl ZonefileFmt for DigestAlgorithm
impl ZonefileFmt for DigestAlgorithm
Source§fn fmt(&self, p: &mut impl Formatter) -> Result
fn fmt(&self, p: &mut impl Formatter) -> Result
fmt::Formatter Read moreSource§fn display_zonefile(
&self,
display_kind: DisplayKind,
) -> ZoneFileDisplay<'_, Self>
fn display_zonefile( &self, display_kind: DisplayKind, ) -> ZoneFileDisplay<'_, Self>
Auto Trait Implementations§
impl Freeze for DigestAlgorithm
impl RefUnwindSafe for DigestAlgorithm
impl Send for DigestAlgorithm
impl Sync for DigestAlgorithm
impl Unpin for DigestAlgorithm
impl UnsafeUnpin for DigestAlgorithm
impl UnwindSafe for DigestAlgorithm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.