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 withHasher::new.-
KeyedHash(&'a [u8; 32]) The [
keyed_hash][crate::keyed_hash] mode. Subtrees must be hashed withHasher::new_keyed.-
DeriveKeyMaterial(&'a ContextKey) The [
derive_key][crate::derive_key] mode. Subtrees must be hashed with eitherHasher::new_derive_keyorHasher::new_from_context_key. TheContextKeycomes fromhash_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) -> TReturns the argument unchanged.
impl<T> ToOwned for Mode<'a>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Mode<'a>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses 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>