Skip to main content

HashSer

Trait HashSer 

Source
pub trait HashSer {
    // Required methods
    fn read<R: Read>(reader: R) -> Result<Self>
       where Self: Sized;
    fn write<W: Write>(&self, writer: W) -> Result<()>;
}
Expand description

A hashable node within a Merkle tree.

Required Methods§

Source

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

Parses a node from the given byte source.

Source

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

Serializes this node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl HashSer for MerkleHashOrchard

Source§

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

Source§

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

Source§

impl HashSer for Node

Source§

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

Source§

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

Source§

impl HashSer for String

Available on crate features test-dependencies only.
Source§

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

Source§

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

Source§

impl HashSer for TestNode

Available on crate features test-dependencies only.
Source§

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

Source§

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

Implementors§