Struct snarkvm_algorithms::merkle_tree::masked_merkle_tree_parameters::MaskedMerkleTreeParameters
source · [−]Expand description
Defines a Merkle tree using the provided hash and depth.
Trait Implementations
sourceimpl<H: Clone + CRH, const DEPTH: usize> Clone for MaskedMerkleTreeParameters<H, DEPTH>
impl<H: Clone + CRH, const DEPTH: usize> Clone for MaskedMerkleTreeParameters<H, DEPTH>
sourcefn clone(&self) -> MaskedMerkleTreeParameters<H, DEPTH>
fn clone(&self) -> MaskedMerkleTreeParameters<H, DEPTH>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<H: CRH, const DEPTH: usize> MaskedMerkleParameters for MaskedMerkleTreeParameters<H, DEPTH>
impl<H: CRH, const DEPTH: usize> MaskedMerkleParameters for MaskedMerkleTreeParameters<H, DEPTH>
sourceimpl<H: CRH, const DEPTH: usize> MerkleParameters for MaskedMerkleTreeParameters<H, DEPTH>
impl<H: CRH, const DEPTH: usize> MerkleParameters for MaskedMerkleTreeParameters<H, DEPTH>
sourcefn setup_message(&self) -> &str
fn setup_message(&self) -> &str
Returns the saved message
from calling the MerkleParameters::setup()
function.
type H = H
const DEPTH: usize
sourcefn crh(&self) -> &Self::H
fn crh(&self) -> &Self::H
Returns the collision-resistant hash function used by the Merkle tree.
sourcefn hash_leaf<L: ToBytes>(
&self,
leaf: &L
) -> Result<<Self::H as CRH>::Output, MerkleError>
fn hash_leaf<L: ToBytes>(
&self,
leaf: &L
) -> Result<<Self::H as CRH>::Output, MerkleError>
Returns the hash of a given leaf.
sourcefn hash_inner_node(
&self,
left: &<Self::H as CRH>::Output,
right: &<Self::H as CRH>::Output
) -> Result<<Self::H as CRH>::Output, MerkleError>
fn hash_inner_node(
&self,
left: &<Self::H as CRH>::Output,
right: &<Self::H as CRH>::Output
) -> Result<<Self::H as CRH>::Output, MerkleError>
Returns the output hash, given a left and right hash value.
fn hash_empty(&self) -> Result<<Self::H as CRH>::Output, MerkleError>
sourceimpl<H: PartialEq + CRH, const DEPTH: usize> PartialEq<MaskedMerkleTreeParameters<H, DEPTH>> for MaskedMerkleTreeParameters<H, DEPTH>
impl<H: PartialEq + CRH, const DEPTH: usize> PartialEq<MaskedMerkleTreeParameters<H, DEPTH>> for MaskedMerkleTreeParameters<H, DEPTH>
sourcefn eq(&self, other: &MaskedMerkleTreeParameters<H, DEPTH>) -> bool
fn eq(&self, other: &MaskedMerkleTreeParameters<H, DEPTH>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MaskedMerkleTreeParameters<H, DEPTH>) -> bool
fn ne(&self, other: &MaskedMerkleTreeParameters<H, DEPTH>) -> bool
This method tests for !=
.
impl<H: Eq + CRH, const DEPTH: usize> Eq for MaskedMerkleTreeParameters<H, DEPTH>
impl<H: CRH, const DEPTH: usize> StructuralEq for MaskedMerkleTreeParameters<H, DEPTH>
impl<H: CRH, const DEPTH: usize> StructuralPartialEq for MaskedMerkleTreeParameters<H, DEPTH>
Auto Trait Implementations
impl<H, const DEPTH: usize> RefUnwindSafe for MaskedMerkleTreeParameters<H, DEPTH> where
H: RefUnwindSafe,
impl<H, const DEPTH: usize> Send for MaskedMerkleTreeParameters<H, DEPTH>
impl<H, const DEPTH: usize> Sync for MaskedMerkleTreeParameters<H, DEPTH>
impl<H, const DEPTH: usize> Unpin for MaskedMerkleTreeParameters<H, DEPTH> where
H: Unpin,
impl<H, const DEPTH: usize> UnwindSafe for MaskedMerkleTreeParameters<H, DEPTH> where
H: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more