Struct snarkvm_algorithms::merkle_tree::merkle_tree::MerkleTree [−][src]
pub struct MerkleTree<P: MerkleParameters> { /* fields omitted */ }
Implementations
impl<P: MerkleParameters> MerkleTree<P>
[src]
impl<P: MerkleParameters> MerkleTree<P>
[src]pub const DEPTH: u8
[src]
pub fn new<L: ToBytes, I: ExactSizeIterator<Item = L>>(
parameters: Arc<P>,
leaves: I
) -> Result<Self, MerkleError>
[src]
parameters: Arc<P>,
leaves: I
) -> Result<Self, MerkleError>
pub fn rebuild<L: ToBytes, I: ExactSizeIterator<Item = L>, J: ExactSizeIterator<Item = L>>(
&self,
old_leaves: I,
new_leaves: J
) -> Result<Self, MerkleError>
[src]
&self,
old_leaves: I,
new_leaves: J
) -> Result<Self, MerkleError>
pub fn root(&self) -> <P::H as CRH>::Output
[src]
pub fn tree(&self) -> &[<P::H as CRH>::Output]ⓘ
[src]
pub fn hashed_leaves(&self) -> &[<P::H as CRH>::Output]ⓘ
[src]
pub fn generate_proof<L: ToBytes>(
&self,
index: usize,
leaf: &L
) -> Result<MerklePath<P>, MerkleError>
[src]
&self,
index: usize,
leaf: &L
) -> Result<MerklePath<P>, MerkleError>
Trait Implementations
impl<P: Default + MerkleParameters> Default for MerkleTree<P>
[src]
impl<P: Default + MerkleParameters> Default for MerkleTree<P>
[src]fn default() -> MerkleTree<P>
[src]
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 T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should 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>,