Struct tree_index::Proof[][src]

pub struct Proof<'a> { /* fields omitted */ }

A merkle proof for an index.

Merkle trees are proven by checking the parent hashes.

Methods

impl<'a> Proof<'a>
[src]

Create a new instance.

Examples

let nodes = vec![];
let _proof = Proof::new(0, 0, &nodes);

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);

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);

Important traits for &'a [u8]

Merkle proof for the index you pass, written in flat-tree notation.

Examples

let nodes = vec![];
let proof = Proof::new(0, 0, &nodes);
assert_eq!(proof.nodes().len(), 0);

Trait Implementations

impl<'a> Debug for Proof<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> PartialEq for Proof<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl<'a> Send for Proof<'a>

impl<'a> Sync for Proof<'a>