Struct snarkvm_wasm::MerkleTree [−][src]
pub struct MerkleTree<P> where
P: MerkleParameters, { /* fields omitted */ }Implementations
impl<P> MerkleTree<P> where
P: MerkleParameters, [src]
impl<P> MerkleTree<P> where
P: MerkleParameters, [src]pub const DEPTH: u8[src]
pub fn new<L, I>(
parameters: Arc<P>,
leaves: I
) -> Result<MerkleTree<P>, MerkleError> where
L: ToBytes,
I: ExactSizeIterator<Item = L>, [src]
parameters: Arc<P>,
leaves: I
) -> Result<MerkleTree<P>, MerkleError> where
L: ToBytes,
I: ExactSizeIterator<Item = L>,
pub fn rebuild<L, I, J>(
&self,
old_leaves: I,
new_leaves: J
) -> Result<MerkleTree<P>, MerkleError> where
L: ToBytes,
I: ExactSizeIterator<Item = L>,
J: ExactSizeIterator<Item = L>, [src]
&self,
old_leaves: I,
new_leaves: J
) -> Result<MerkleTree<P>, MerkleError> where
L: ToBytes,
I: ExactSizeIterator<Item = L>,
J: ExactSizeIterator<Item = L>,
pub fn root(&self) -> <<P as MerkleParameters>::H as CRH>::Output[src]
pub fn tree(&self) -> &[<<P as MerkleParameters>::H as CRH>::Output]ⓘ[src]
pub fn hashed_leaves(&self) -> &[<<P as MerkleParameters>::H as CRH>::Output]ⓘ[src]
pub fn generate_proof<L>(
&self,
index: usize,
leaf: &L
) -> Result<MerklePath<P>, MerkleError> where
L: ToBytes, [src]
&self,
index: usize,
leaf: &L
) -> Result<MerklePath<P>, MerkleError> where
L: ToBytes,
Trait Implementations
impl<P> Default for MerkleTree<P> where
P: Default + MerkleParameters, [src]
impl<P> Default for MerkleTree<P> where
P: Default + MerkleParameters, [src]pub fn default() -> MerkleTree<P>[src]
pub fn default() -> MerkleTree<P>[src]Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<P> RefUnwindSafe for MerkleTree<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 MerkleTree<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 MerkleTree<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 MerkleTree<P> where
<<P as MerkleParameters>::H as CRH>::Output: Unpin,
<<P as MerkleParameters>::H as CRH>::Output: Unpin,
impl<P> UnwindSafe for MerkleTree<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 Timpl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,