Enum Mode

pub enum Mode<'a>

The mode argument to merge_subtrees_root and friends

See the module level examples.

Variants

Hash

The default [hash][crate::hash] mode. Subtrees must be hashed with Hasher::new.

KeyedHash(&'a [u8; 32])

The [keyed_hash][crate::keyed_hash] mode. Subtrees must be hashed with Hasher::new_keyed.

DeriveKeyMaterial(&'a ContextKey)

The [derive_key][crate::derive_key] mode. Subtrees must be hashed with either Hasher::new_derive_key or Hasher::new_from_context_key. The ContextKey comes from hash_derive_key_context.

Trait Implementations

impl<'a> Clone for Mode<'a>

fn clone(&self) -> Mode<'a>

impl<'a> Copy for Mode<'a>

impl<'a> Debug for Mode<'a>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<'a> Freeze for Mode<'a>

impl<'a> RefUnwindSafe for Mode<'a>

impl<'a> Send for Mode<'a>

impl<'a> Sync for Mode<'a>

impl<'a> Unpin for Mode<'a>

impl<'a> UnsafeUnpin for Mode<'a>

impl<'a> UnwindSafe for Mode<'a>

Blanket Implementations

impl<T> Any for Mode<'a> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Mode<'a> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Mode<'a> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Mode<'a> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Mode<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Mode<'a> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Mode<'a> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Mode<'a> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Mode<'a> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>