pub trait Hashable: Debug {
    // Required methods
    fn empty_leaf() -> Self;
    fn combine(level: Level, a: &Self, b: &Self) -> Self;

    // Provided method
    fn empty_root(level: Level) -> Self
       where Self: Sized { ... }
}
Expand description

A trait describing the operations that make a type suitable for use as a leaf or node value in a merkle tree.

Required Methods§

source

fn empty_leaf() -> Self

source

fn combine(level: Level, a: &Self, b: &Self) -> Self

Provided Methods§

source

fn empty_root(level: Level) -> Selfwhere Self: Sized,

Implementations on Foreign Types§

source§

impl Hashable for String

Available on crate feature test-dependencies only.
source§

fn empty_leaf() -> Self

source§

fn combine(_: Level, a: &Self, b: &Self) -> Self

source§

impl<H: Hashable> Hashable for Option<H>

Available on crate feature test-dependencies only.
source§

fn empty_leaf() -> Self

source§

fn combine(l: Level, a: &Self, b: &Self) -> Self

Implementors§

source§

impl Hashable for TestNode

source§

impl Hashable for SipHashable

Available on crate feature test-dependencies only.