[][src]Enum fs_verity::InnerHashAlgorithm

#[repr(u8)]pub enum InnerHashAlgorithm {
    Sha256,
    Sha512,
}

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

impl Clone for InnerHashAlgorithm[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.

impl PartialEq<InnerHashAlgorithm> for InnerHashAlgorithm[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.

impl TryFromPrimitive for InnerHashAlgorithm[src]

type Primitive = u8

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.