pub struct Proof<'a> { /* fields omitted */ }
A merkle proof for an index.
Merkle trees are proven by checking the parent hashes.
Create a new instance.
let nodes = vec![];
let _proof = Proof::new(0, 0, &nodes);
Get the index which was used to verify this node.
let nodes = vec![];
let proof = Proof::new(0, 0, &nodes);
assert_eq!(proof.index(), 0);
Get the index for the node which verifies the input index.
let nodes = vec![];
let proof = Proof::new(0, 0, &nodes);
assert_eq!(proof.verified_by(), 0);
Merkle proof for the index you pass, written in flat-tree
notation.
let nodes = vec![];
let proof = Proof::new(0, 0, &nodes);
assert_eq!(proof.nodes().len(), 0);
Formats the value using the given formatter. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.