[−][src]Struct zkp_merkle_tree::Tree
Merkle tree
The tree will become the owner of the Container
. This is necessary because
when low layer-omission is implemented we need immutable access to the
leaves. If shared ownership is required the Container
can be an Rc<_>
.
Methods
impl<Container: VectorCommitment> Tree<Container>
[src]
pub fn from_leaves(leaves: Container) -> Result<Self>
[src]
pub fn from_leaves_skip_layers(
leaves: Container,
skip_layers: usize
) -> Result<Self>
[src]
leaves: Container,
skip_layers: usize
) -> Result<Self>
pub fn commitment(&self) -> &Commitment
[src]
pub fn leaf_depth(&self) -> usize
[src]
pub fn leaves(&self) -> &Container
[src]
pub fn leaf(&self, index: usize) -> Container::Leaf
[src]
pub fn node_hash(&self, index: Index) -> Hash
[src]
pub fn open(&self, indices: &[usize]) -> Result<Proof>
[src]
Trait Implementations
impl<Container: Debug + VectorCommitment> Debug for Tree<Container>
[src]
Auto Trait Implementations
impl<Container> Send for Tree<Container> where
Container: Send,
Container: Send,
impl<Container> Sync for Tree<Container>
impl<Container> Unpin for Tree<Container> where
Container: Unpin,
Container: Unpin,
impl<Container> UnwindSafe for Tree<Container> where
Container: UnwindSafe,
Container: UnwindSafe,
impl<Container> RefUnwindSafe for Tree<Container> where
Container: RefUnwindSafe,
Container: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,