Struct snarkvm_wasm::MerklePath [−][src]
pub struct MerklePath<P> where
P: MerkleParameters, { pub parameters: Arc<P>, pub path: Vec<(<<P as MerkleParameters>::H as CRH>::Output, <<P as MerkleParameters>::H as CRH>::Output), Global>, }
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<(<<P as MerkleParameters>::H as CRH>::Output, <<P as MerkleParameters>::H as CRH>::Output), Global>
Implementations
impl<P> MerklePath<P> where
P: MerkleParameters,
[src]
impl<P> MerklePath<P> where
P: MerkleParameters,
[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, HGadget, F> AllocGadget<MerklePath<P>, F> for MerklePathGadget<P, HGadget, F> where
P: MerkleParameters,
F: Field,
HGadget: CRHGadget<<P as MerkleParameters>::H, F>,
[src]pub fn alloc<Fn, T, CS>(
cs: CS,
value_gen: Fn
) -> Result<MerklePathGadget<P, HGadget, F>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<MerklePath<P>>,
[src]
cs: CS,
value_gen: Fn
) -> Result<MerklePathGadget<P, HGadget, F>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<MerklePath<P>>,
pub fn alloc_input<Fn, T, CS>(
cs: CS,
value_gen: Fn
) -> Result<MerklePathGadget<P, HGadget, F>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<MerklePath<P>>,
[src]
cs: CS,
value_gen: Fn
) -> Result<MerklePathGadget<P, HGadget, F>, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<MerklePath<P>>,
fn alloc_constant<Fn, T, CS>(_cs: CS, _f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
[src]
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
fn alloc_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
[src]
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
fn alloc_input_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
[src]
Fn: FnOnce() -> Result<T, SynthesisError>,
CS: ConstraintSystem<F>,
T: Borrow<V>,
impl<P> Clone for MerklePath<P> where
P: Clone + MerkleParameters,
[src]
impl<P> Clone for MerklePath<P> where
P: Clone + MerkleParameters,
[src]pub fn clone(&self) -> MerklePath<P>
[src]
pub 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 for MerklePath<P> where
P: Debug + MerkleParameters,
[src]
impl<P> Debug for MerklePath<P> where
P: Debug + MerkleParameters,
[src]impl<P> Default for MerklePath<P> where
P: MerkleParameters,
[src]
impl<P> Default for MerklePath<P> where
P: MerkleParameters,
[src]pub fn default() -> MerklePath<P>
[src]
pub fn default() -> MerklePath<P>
[src]Returns the “default value” for a type. Read more
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>,