Struct snarkvm_algorithms::merkle_tree::merkle_path::MerklePath [−][src]
pub struct MerklePath<P: MerkleParameters> { pub parameters: Arc<P>, pub path: Vec<(MerkleTreeDigest<P>, MerkleTreeDigest<P>)>, }
Expand description
Stores the hashes of a particular path (in order) from leaf to root.
Our path is_left_child()
if the boolean in path
is true.
Fields
parameters: Arc<P>
path: Vec<(MerkleTreeDigest<P>, MerkleTreeDigest<P>)>
Implementations
impl<P: MerkleParameters> MerklePath<P>
[src]
impl<P: MerkleParameters> MerklePath<P>
[src]pub fn verify<L: ToBytes>(
&self,
root_hash: &MerkleTreeDigest<P>,
leaf: &L
) -> Result<bool, MerkleError>
[src]
&self,
root_hash: &MerkleTreeDigest<P>,
leaf: &L
) -> Result<bool, MerkleError>
Trait Implementations
impl<P: Clone + MerkleParameters> Clone for MerklePath<P>
[src]
impl<P: Clone + MerkleParameters> Clone for MerklePath<P>
[src]fn clone(&self) -> MerklePath<P>
[src]
fn clone(&self) -> MerklePath<P>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<P: Debug + MerkleParameters> Debug for MerklePath<P>
[src]
impl<P: Debug + MerkleParameters> Debug for MerklePath<P>
[src]impl<P: MerkleParameters> Default for MerklePath<P>
[src]
impl<P: MerkleParameters> Default for MerklePath<P>
[src]Auto Trait Implementations
impl<P> RefUnwindSafe for MerklePath<P> where
P: RefUnwindSafe,
<<P as MerkleParameters>::H as CRH>::Output: RefUnwindSafe,
P: RefUnwindSafe,
<<P as MerkleParameters>::H as CRH>::Output: RefUnwindSafe,
impl<P> Send for MerklePath<P> where
P: Send + Sync,
<<P as MerkleParameters>::H as CRH>::Output: Send,
P: Send + Sync,
<<P as MerkleParameters>::H as CRH>::Output: Send,
impl<P> Sync for MerklePath<P> where
P: Send + Sync,
<<P as MerkleParameters>::H as CRH>::Output: Sync,
P: Send + Sync,
<<P as MerkleParameters>::H as CRH>::Output: Sync,
impl<P> Unpin for MerklePath<P> where
<<P as MerkleParameters>::H as CRH>::Output: Unpin,
<<P as MerkleParameters>::H as CRH>::Output: Unpin,
impl<P> UnwindSafe for MerklePath<P> where
P: RefUnwindSafe,
<<P as MerkleParameters>::H as CRH>::Output: UnwindSafe,
P: RefUnwindSafe,
<<P as MerkleParameters>::H as CRH>::Output: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,