/// Recomputes root hash of the full tree that this mixed tree was
/// constructed from.
Recomputes root hash of the full tree that this mixed tree was
constructed from.
Recomputes root hash of the full tree that this mixed tree was constructed from .
pub fn digest(&self) -> Digest {
        match self {
            Self::Empty => tree_hash::empty_subtree_hash(),
            Self::Fork(lr) => tree_hash::compute_fork_digest(&lr.0.digest(), &lr.1.digest()),
            Self::Labeled(label, subtree) => {
                tree_hash::compute_node_digest(label, &subtree.digest())
            }
            Self::Leaf(buf) => tree_hash::compute_leaf_digest(&buf[..]),
            Self::Pruned(digest) => digest.clone(),
        }
    }
pub fn digest ( & self ) -> Digest { match self { Self :: Empty => tree_hash :: empty_subtree_hash ( ) , Self :: Fork ( lr ) => tree_hash :: compute_fork_digest ( & lr . 0 . digest ( ) , & lr . 1 . digest ( ) ) , Self :: Labeled ( label , subtree ) => { tree_hash :: compute_node_digest ( label , & subtree . digest ( ) ) } Self :: Leaf ( buf ) => tree_hash :: compute_leaf_digest ( & buf [ .. ] ) , Self :: Pruned ( digest ) => digest . clone ( ) , } }
Recomputes root hash of the full tree that this mixed tree was
constructed from.
Recomputes root hash of the full tree that this mixed tree was constructed from .
&self