pub struct NonMembershipProof {
pub merkle_proof: MerkleProof,
pub closest_index: usize,
pub missing_node: LeafNode,
}
Fields§
§merkle_proof: MerkleProof
§closest_index: usize
§missing_node: LeafNode
Implementations§
Source§impl NonMembershipProof
impl NonMembershipProof
Sourcepub fn verify(&self) -> bool
pub fn verify(&self) -> bool
Verifies the non-membership proof of a node in the indexed Merkle Tree.
This function checks the non-membership proof of a node to ensure that the node is not present in the tree. It verifies the proof’s path and the absence of the node in the tree.
§Returns
true
if the proof is valid and the node is not present, false
otherwise.
Trait Implementations§
Source§impl Clone for NonMembershipProof
impl Clone for NonMembershipProof
Source§fn clone(&self) -> NonMembershipProof
fn clone(&self) -> NonMembershipProof
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NonMembershipProof
impl Debug for NonMembershipProof
Source§impl<'de> Deserialize<'de> for NonMembershipProof
impl<'de> Deserialize<'de> for NonMembershipProof
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NonMembershipProof
impl RefUnwindSafe for NonMembershipProof
impl Send for NonMembershipProof
impl Sync for NonMembershipProof
impl Unpin for NonMembershipProof
impl UnwindSafe for NonMembershipProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more