pub enum DigestAlg {
Sha1,
Sha256,
Gost,
Sha384,
Int(u8),
}
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.
Variants
Sha1
Specifies that the SHA-1 hash function is used.
Implementation of this function is currently mandatory.
Sha256
Specifies that the SHA-256 hash function is used.
Implementation of this function is currently mandatory.
Gost
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.
Sha384
Specifies that the SHA-384 hash function is used.
Use of this hash function is described in RFC 6605. Implementing the function is optional.
Int(u8)
A raw value given through its integer.
Implementations
sourceimpl DigestAlg
impl DigestAlg
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.
Trait Implementations
sourceimpl Compose for DigestAlg
impl Compose for DigestAlg
sourcefn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the concrete representation of the value to the target. Read more
sourcefn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the canonical representation of the value to the target. Read more
sourceimpl<'de> Deserialize<'de> for DigestAlg
impl<'de> Deserialize<'de> for DigestAlg
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for DigestAlg
impl Ord for DigestAlg
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<DigestAlg> for DigestAlg
impl PartialEq<DigestAlg> for DigestAlg
sourceimpl PartialEq<DigestAlg> for u8
impl PartialEq<DigestAlg> for u8
sourceimpl PartialEq<u8> for DigestAlg
impl PartialEq<u8> for DigestAlg
sourceimpl PartialOrd<DigestAlg> for DigestAlg
impl PartialOrd<DigestAlg> for DigestAlg
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<DigestAlg> for u8
impl PartialOrd<DigestAlg> for u8
sourcefn partial_cmp(&self, other: &DigestAlg) -> Option<Ordering>
fn partial_cmp(&self, other: &DigestAlg) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<u8> for DigestAlg
impl PartialOrd<u8> for DigestAlg
sourcefn partial_cmp(&self, other: &u8) -> Option<Ordering>
fn partial_cmp(&self, other: &u8) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for DigestAlg
impl Eq for DigestAlg
Auto Trait Implementations
impl RefUnwindSafe for DigestAlg
impl Send for DigestAlg
impl Sync for DigestAlg
impl Unpin for DigestAlg
impl UnwindSafe for DigestAlg
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.