Skip to main content

AsHashTree

Trait AsHashTree 

Source
pub trait AsHashTree {
    // Required methods
    fn root_hash(&self) -> Hash;
    fn as_hash_tree(&self) -> HashTree<'_>;
}
Expand description

Types that can be converted into a HashTree.

Required Methods§

Source

fn root_hash(&self) -> Hash

Returns the root hash of the tree without constructing it. Must be equivalent to as_hash_tree().reconstruct().

Source

fn as_hash_tree(&self) -> HashTree<'_>

Constructs a hash tree corresponding to the data.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl AsHashTree for Vec<u8>

Implementors§