Struct snarkvm_wasm::MerklePath[][src]

pub struct MerklePath<P> where
    P: MerkleParameters
{ pub parameters: P, pub path: Vec<(<<P as MerkleParameters>::H as CRH>::Output, <<P as MerkleParameters>::H as CRH>::Output), Global>, }

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: Ppath: Vec<(<<P as MerkleParameters>::H as CRH>::Output, <<P as MerkleParameters>::H as CRH>::Output), Global>

Implementations

impl<P> MerklePath<P> where
    P: MerkleParameters
[src]

pub fn verify<L>(
    &self,
    root_hash: &<<P as MerkleParameters>::H as CRH>::Output,
    leaf: &L
) -> Result<bool, MerkleError> where
    L: ToBytes
[src]

Trait Implementations

impl<P, HGadget, F> AllocGadget<MerklePath<P>, F> for MerklePathGadget<P, HGadget, F> where
    P: MerkleParameters,
    F: Field,
    HGadget: CRHGadget<<P as MerkleParameters>::H, F>, 
[src]

impl<P> Clone for MerklePath<P> where
    P: MerkleParameters + Clone
[src]

impl<P> Debug for MerklePath<P> where
    P: MerkleParameters + Debug
[src]

impl<P> Default for MerklePath<P> where
    P: MerkleParameters
[src]

Auto Trait Implementations

impl<P> RefUnwindSafe for MerklePath<P> where
    P: RefUnwindSafe,
    <<P as MerkleParameters>::H as CRH>::Output: RefUnwindSafe

impl<P> Send for MerklePath<P> where
    P: Send,
    <<P as MerkleParameters>::H as CRH>::Output: Send

impl<P> Sync for MerklePath<P> where
    P: Sync,
    <<P as MerkleParameters>::H as CRH>::Output: Sync

impl<P> Unpin for MerklePath<P> where
    P: Unpin,
    <<P as MerkleParameters>::H as CRH>::Output: Unpin

impl<P> UnwindSafe for MerklePath<P> where
    P: UnwindSafe,
    <<P as MerkleParameters>::H as CRH>::Output: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,