pub trait LogData<D, V>{
    // Required methods
    fn has_hash(&self, node: Node) -> bool;
    fn hash_for(&self, node: Node) -> Option<Hash<D>>;

    // Provided methods
    fn prove_inclusion(
        &self,
        leaf: Node,
        log_length: usize
    ) -> InclusionProof<D, V> { ... }
    fn prove_consistency(
        &self,
        old_length: usize,
        new_length: usize
    ) -> ConsistencyProof<D, V> { ... }
}
Expand description

A collection of hash data

Required Methods§

source

fn has_hash(&self, node: Node) -> bool

Does this hash exist in the collection?

source

fn hash_for(&self, node: Node) -> Option<Hash<D>>

Get the hash for a given node None if node does not yet exist

Provided Methods§

source

fn prove_inclusion(&self, leaf: Node, log_length: usize) -> InclusionProof<D, V>

Construct an inclusion proof for this log

source

fn prove_consistency( &self, old_length: usize, new_length: usize ) -> ConsistencyProof<D, V>

Construct a consistency proof for this log

Implementors§

source§

impl<D, V> LogData<D, V> for VecLog<D, V>