pub enum Nsec3HashAlg {
Sha1,
Int(u8),
}
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.
Variants
Sha1
Specifies that the SHA-1 hash function is used.
Int(u8)
A raw value given through its integer.
Implementations
sourceimpl Nsec3HashAlg
impl Nsec3HashAlg
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.
sourceimpl Nsec3HashAlg
impl Nsec3HashAlg
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations
sourceimpl Clone for Nsec3HashAlg
impl Clone for Nsec3HashAlg
sourcefn clone(&self) -> Nsec3HashAlg
fn clone(&self) -> Nsec3HashAlg
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Compose for Nsec3HashAlg
impl Compose for Nsec3HashAlg
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 Debug for Nsec3HashAlg
impl Debug for Nsec3HashAlg
sourceimpl<'de> Deserialize<'de> for Nsec3HashAlg
impl<'de> Deserialize<'de> for Nsec3HashAlg
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 Display for Nsec3HashAlg
impl Display for Nsec3HashAlg
sourceimpl<'a> From<&'a Nsec3HashAlg> for u8
impl<'a> From<&'a Nsec3HashAlg> for u8
sourcefn from(value: &'a Nsec3HashAlg) -> Self
fn from(value: &'a Nsec3HashAlg) -> Self
Converts to this type from the input type.
sourceimpl From<Nsec3HashAlg> for u8
impl From<Nsec3HashAlg> for u8
sourcefn from(value: Nsec3HashAlg) -> Self
fn from(value: Nsec3HashAlg) -> Self
Converts to this type from the input type.
sourceimpl From<u8> for Nsec3HashAlg
impl From<u8> for Nsec3HashAlg
sourceimpl FromStr for Nsec3HashAlg
impl FromStr for Nsec3HashAlg
sourceimpl Hash for Nsec3HashAlg
impl Hash for Nsec3HashAlg
sourceimpl Ord for Nsec3HashAlg
impl Ord for Nsec3HashAlg
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<Ref: AsRef<[u8]>> Parse<Ref> for Nsec3HashAlg
impl<Ref: AsRef<[u8]>> Parse<Ref> for Nsec3HashAlg
sourceimpl PartialEq<Nsec3HashAlg> for Nsec3HashAlg
impl PartialEq<Nsec3HashAlg> for Nsec3HashAlg
sourceimpl PartialEq<Nsec3HashAlg> for u8
impl PartialEq<Nsec3HashAlg> for u8
sourcefn eq(&self, other: &Nsec3HashAlg) -> bool
fn eq(&self, other: &Nsec3HashAlg) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialEq<u8> for Nsec3HashAlg
impl PartialEq<u8> for Nsec3HashAlg
sourceimpl PartialOrd<Nsec3HashAlg> for Nsec3HashAlg
impl PartialOrd<Nsec3HashAlg> for Nsec3HashAlg
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<Nsec3HashAlg> for u8
impl PartialOrd<Nsec3HashAlg> for u8
sourcefn partial_cmp(&self, other: &Nsec3HashAlg) -> Option<Ordering>
fn partial_cmp(&self, other: &Nsec3HashAlg) -> 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 Nsec3HashAlg
impl PartialOrd<u8> for Nsec3HashAlg
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
sourceimpl Scan for Nsec3HashAlg
impl Scan for Nsec3HashAlg
sourceimpl Serialize for Nsec3HashAlg
impl Serialize for Nsec3HashAlg
impl Copy for Nsec3HashAlg
impl Eq for Nsec3HashAlg
Auto Trait Implementations
impl RefUnwindSafe for Nsec3HashAlg
impl Send for Nsec3HashAlg
impl Sync for Nsec3HashAlg
impl Unpin for Nsec3HashAlg
impl UnwindSafe for Nsec3HashAlg
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.