[][src]Trait zcash_primitives::merkle_tree::Hashable

pub trait Hashable: Clone + Copy {
    fn read<R: Read>(reader: R) -> Result<Self>;
fn write<W: Write>(&self, writer: W) -> Result<()>;
fn combine(_: usize, _: &Self, _: &Self) -> Self;
fn blank() -> Self;
fn empty_root(_: usize) -> Self; }

A hashable node within a Merkle tree.

Required methods

fn read<R: Read>(reader: R) -> Result<Self>

Parses a node from the given byte source.

fn write<W: Write>(&self, writer: W) -> Result<()>

Serializes this node.

fn combine(_: usize, _: &Self, _: &Self) -> Self

Returns the parent node within the tree of the two given nodes.

fn blank() -> Self

Returns a blank leaf node.

fn empty_root(_: usize) -> Self

Returns the empty root for the given depth.

Loading content...

Implementors

impl Hashable for Node[src]

Loading content...