[][src]Trait cached_tree_hash::CachedTreeHash

pub trait CachedTreeHash<Cache>: TreeHash {
    fn new_tree_hash_cache() -> Cache;
fn recalculate_tree_hash_root(
        &self,
        cache: &mut Cache
    ) -> Result<Hash256, Error>; }

Trait for types which can make use of a cache to accelerate calculation of their tree hash root.

Required methods

fn new_tree_hash_cache() -> Cache

Create a new cache appropriate for use with values of this type.

fn recalculate_tree_hash_root(
    &self,
    cache: &mut Cache
) -> Result<Hash256, Error>

Update the cache and use it to compute the tree hash root for self.

Loading content...

Implementations on Foreign Types

impl<N: Unsigned> CachedTreeHash<TreeHashCache> for FixedVector<Hash256, N>[src]

impl<N: Unsigned> CachedTreeHash<TreeHashCache> for FixedVector<u64, N>[src]

impl<N: Unsigned> CachedTreeHash<TreeHashCache> for VariableList<Hash256, N>[src]

impl<N: Unsigned> CachedTreeHash<TreeHashCache> for VariableList<u64, N>[src]

impl<T, N> CachedTreeHash<MultiTreeHashCache> for VariableList<T, N> where
    T: CachedTreeHash<TreeHashCache>,
    N: Unsigned, 
[src]

Loading content...

Implementors

Loading content...