pub struct MerkleProof {
pub siblings: Vec<SiblingNode>,
}Expand description
A Merkle path proving that one leaf belongs to a tree.
Fields§
§siblings: Vec<SiblingNode>Implementations§
Source§impl MerkleProof
impl MerkleProof
Sourcepub fn verify(&self, leaf: &IntentHash, expected_root: &IntentHash) -> bool
pub fn verify(&self, leaf: &IntentHash, expected_root: &IntentHash) -> bool
Recompute the root from leaf along this proof path and return whether
it equals expected_root.
Trait Implementations§
Source§impl Clone for MerkleProof
impl Clone for MerkleProof
Source§fn clone(&self) -> MerkleProof
fn clone(&self) -> MerkleProof
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MerkleProof
impl Debug for MerkleProof
Source§impl Default for MerkleProof
impl Default for MerkleProof
Source§fn default() -> MerkleProof
fn default() -> MerkleProof
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MerkleProof
impl<'de> Deserialize<'de> for MerkleProof
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
Source§impl PartialEq for MerkleProof
impl PartialEq for MerkleProof
Source§fn eq(&self, other: &MerkleProof) -> bool
fn eq(&self, other: &MerkleProof) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MerkleProof
impl Serialize for MerkleProof
impl StructuralPartialEq for MerkleProof
Auto Trait Implementations§
impl Freeze for MerkleProof
impl RefUnwindSafe for MerkleProof
impl Send for MerkleProof
impl Sync for MerkleProof
impl Unpin for MerkleProof
impl UnsafeUnpin for MerkleProof
impl UnwindSafe for MerkleProof
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