Struct merkle_cbt::merkle_tree::MerkleProof
source · [−]pub struct MerkleProof<T, M> { /* private fields */ }
Implementations
sourceimpl<T, M> MerkleProof<T, M> where
T: Ord + Default + Clone,
M: Merge<Item = T>,
impl<T, M> MerkleProof<T, M> where
T: Ord + Default + Clone,
M: Merge<Item = T>,
pub fn new(indices: Vec<u32>, lemmas: Vec<T>) -> Self
pub fn root(&self, leaves: &[T]) -> Option<T>
pub fn verify(&self, root: &T, leaves: &[T]) -> bool
pub fn indices(&self) -> &[u32]
pub fn lemmas(&self) -> &[T]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Auto Trait Implementations
impl<T, M> RefUnwindSafe for MerkleProof<T, M> where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, M> Send for MerkleProof<T, M> where
M: Send,
T: Send,
impl<T, M> Sync for MerkleProof<T, M> where
M: Sync,
T: Sync,
impl<T, M> Unpin for MerkleProof<T, M> where
M: Unpin,
T: Unpin,
impl<T, M> UnwindSafe for MerkleProof<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