pub struct Proof<'a> { /* private fields */ }
Expand description
A merkle proof for an index.
Merkle trees are proven by checking the parent hashes.
Implementations§
Source§impl<'a> Proof<'a>
impl<'a> Proof<'a>
Sourcepub fn index(&self) -> u64
pub fn index(&self) -> u64
Get the index which was used to verify this node.
§Examples
let nodes = vec![];
let proof = Proof::new(0, 0, &nodes);
assert_eq!(proof.index(), 0);
Sourcepub fn verified_by(&self) -> u64
pub fn verified_by(&self) -> u64
Get the index for the node which verifies the input index.
§Examples
let nodes = vec![];
let proof = Proof::new(0, 0, &nodes);
assert_eq!(proof.verified_by(), 0);
Trait Implementations§
impl<'a> StructuralPartialEq for Proof<'a>
Auto Trait Implementations§
impl<'a> Freeze for Proof<'a>
impl<'a> RefUnwindSafe for Proof<'a>
impl<'a> Send for Proof<'a>
impl<'a> Sync for Proof<'a>
impl<'a> Unpin for Proof<'a>
impl<'a> UnwindSafe for Proof<'a>
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