Struct merkle_cbt::merkle_tree::CBMT
source · [−]pub struct CBMT<T, M> { /* private fields */ }
Implementations
sourceimpl<T, M> CBMT<T, M> where
T: Ord + Default + Clone,
M: Merge<Item = T>,
impl<T, M> CBMT<T, M> where
T: Ord + Default + Clone,
M: Merge<Item = T>,
pub fn build_merkle_root(leaves: &[T]) -> T
pub fn build_merkle_tree(leaves: &[T]) -> MerkleTree<T, M>
pub fn build_merkle_proof(
leaves: &[T],
leaf_indices: &[u32]
) -> Option<MerkleProof<T, M>>
sourcepub fn retrieve_leaves(
leaves: &[T],
proof: &MerkleProof<T, M>
) -> Option<Vec<T>>
pub fn retrieve_leaves(
leaves: &[T],
proof: &MerkleProof<T, M>
) -> Option<Vec<T>>
retrieve that a proof points to leaves of a tree, returning None
if the proof indices is empty or out of bounds
Trait Implementations
Auto Trait Implementations
impl<T, M> RefUnwindSafe for CBMT<T, M> where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, M> Send for CBMT<T, M> where
M: Send,
T: Send,
impl<T, M> Sync for CBMT<T, M> where
M: Sync,
T: Sync,
impl<T, M> Unpin for CBMT<T, M> where
M: Unpin,
T: Unpin,
impl<T, M> UnwindSafe for CBMT<T, M> where
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more