[][src]Enum ics23::HashOp

#[repr(i32)]
pub enum HashOp {
    NoHash,
    Sha256,
    Sha512,
    Keccak,
    Ripemd160,
    Bitcoin,
}

Variants

NoHash

NO_HASH is the default if no data passed. Note this is an illegal argument some places.

Sha256Sha512KeccakRipemd160Bitcoin

ripemd160(sha256(x))

Methods

impl HashOp[src]

pub fn is_valid(value: i32) -> bool[src]

Returns true if value is a variant of HashOp.

pub fn from_i32(value: i32) -> Option<HashOp>[src]

Converts an i32 to a HashOp, or None if value is not a valid variant.

Trait Implementations

impl From<HashOp> for i32[src]

impl Ord for HashOp[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<HashOp> for HashOp[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<HashOp> for HashOp[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Default for HashOp[src]

impl Clone for HashOp[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for HashOp[src]

impl Copy for HashOp[src]

impl Debug for HashOp[src]

impl Hash for HashOp[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for HashOp

impl Unpin for HashOp

impl Sync for HashOp

impl UnwindSafe for HashOp

impl RefUnwindSafe for HashOp

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self