Enum fs_verity::InnerHashAlgorithm
source · #[repr(u8)]pub enum InnerHashAlgorithm {
Sha256,
Sha512,
}
Expand description
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§
Sha256
As string: sha256
. As number: FS_VERITY_HASH_ALG_SHA256
from the kernel API.
Sha512
As string: sha512
. As number: FS_VERITY_HASH_ALG_SHA512
from the kernel API.
Trait Implementations§
source§impl Clone for InnerHashAlgorithm
impl Clone for InnerHashAlgorithm
source§fn clone(&self) -> InnerHashAlgorithm
fn clone(&self) -> InnerHashAlgorithm
Returns a copy 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 InnerHashAlgorithm
impl Debug for InnerHashAlgorithm
source§impl Default for InnerHashAlgorithm
impl Default for InnerHashAlgorithm
source§impl Display for InnerHashAlgorithm
impl Display for InnerHashAlgorithm
source§impl FromStr for InnerHashAlgorithm
impl FromStr for InnerHashAlgorithm
source§impl PartialEq<InnerHashAlgorithm> for InnerHashAlgorithm
impl PartialEq<InnerHashAlgorithm> for InnerHashAlgorithm
source§fn eq(&self, other: &InnerHashAlgorithm) -> bool
fn eq(&self, other: &InnerHashAlgorithm) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u8> for InnerHashAlgorithm
impl TryFrom<u8> for InnerHashAlgorithm
§type Error = TryFromPrimitiveError<InnerHashAlgorithm>
type Error = TryFromPrimitiveError<InnerHashAlgorithm>
The type returned in the event of a conversion error.
impl Copy for InnerHashAlgorithm
impl Eq for InnerHashAlgorithm
impl StructuralEq for InnerHashAlgorithm
impl StructuralPartialEq for InnerHashAlgorithm
Auto Trait Implementations§
impl RefUnwindSafe for InnerHashAlgorithm
impl Send for InnerHashAlgorithm
impl Sync for InnerHashAlgorithm
impl Unpin for InnerHashAlgorithm
impl UnwindSafe for InnerHashAlgorithm
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