[−][src]Enum fs_verity::InnerHashAlgorithm
Enum of the supported inner hash algorithms.
The Default
value is Sha256
, corresponding to the default hash algorithm in the fsverity
tools, and to the
default generic parameter of FsVerityDigest
.
This enum supports conversion to string using std::fmt::Display
and from a string using [parse_display::FromStr
].
It also supports conversion to integer using as u8
and from integer using TryFromPrimitive
). These integers values
match the hash algorithm numbering used in the fsverity kernel API.
Variants
As string: sha256
. As number: FS_VERITY_HASH_ALG_SHA256
from the kernel API.
As string: sha512
. As number: FS_VERITY_HASH_ALG_SHA512
from the kernel API.
Trait Implementations
impl Clone for InnerHashAlgorithm
[src]
pub fn clone(&self) -> InnerHashAlgorithm
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for InnerHashAlgorithm
[src]
impl Debug for InnerHashAlgorithm
[src]
impl Default for InnerHashAlgorithm
[src]
impl Display for InnerHashAlgorithm
[src]
impl Eq for InnerHashAlgorithm
[src]
impl FromStr for InnerHashAlgorithm
[src]
type Err = ParseError
The associated error which can be returned from parsing.
pub fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<InnerHashAlgorithm> for InnerHashAlgorithm
[src]
pub fn eq(&self, other: &InnerHashAlgorithm) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for InnerHashAlgorithm
[src]
impl StructuralPartialEq for InnerHashAlgorithm
[src]
impl TryFrom<u8> for InnerHashAlgorithm
[src]
type Error = TryFromPrimitiveError<Self>
The type returned in the event of a conversion error.
pub fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
[src]
impl TryFromPrimitive for InnerHashAlgorithm
[src]
type Primitive = u8
pub const NAME: &'static str
[src]
pub fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
[src]
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations
impl RefUnwindSafe for InnerHashAlgorithm
[src]
impl Send for InnerHashAlgorithm
[src]
impl Sync for InnerHashAlgorithm
[src]
impl Unpin for InnerHashAlgorithm
[src]
impl UnwindSafe for InnerHashAlgorithm
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,