[][src]Trait merkle_tree_stream::HashMethods

pub trait HashMethods {
    type Node: Node + From<NodeParts<Self::Hash>>;
    type Hash;
    fn leaf(&self, leaf: &PartialNode, roots: &[Rc<Self::Node>]) -> Self::Hash;
fn parent(&self, a: &Self::Node, b: &Self::Node) -> Self::Hash; }

Functions that need to be implemented for MerkleTreeStream.

Associated Types

type Node: Node + From<NodeParts<Self::Hash>>

The Node type we'll iterate over.

type Hash

The type of hash returned from the hashing functions.

Loading content...

Required methods

fn leaf(&self, leaf: &PartialNode, roots: &[Rc<Self::Node>]) -> Self::Hash

Pass data through a hash function.

fn parent(&self, a: &Self::Node, b: &Self::Node) -> Self::Hash

Pass hashes through a hash function.

Loading content...

Implementors

Loading content...