pub trait MKMapValue<K: MKMapKey>: Clone + TryInto<MKTreeNode> {
    // Required methods
    fn compute_root(&self) -> StdResult<MKTreeNode>;
    fn contains<T: Into<MKTreeNode> + Clone>(&self, leaf: &T) -> bool;
    fn compute_proof<T: Into<MKTreeNode> + Clone>(
        &self,
        leaves: &[T]
    ) -> StdResult<Option<MKMapProof<K>>>;
}
Expand description

The trait implemented by the values of a MKMap

Required Methods§

source

fn compute_root(&self) -> StdResult<MKTreeNode>

Get the root of the merkelized map value

source

fn contains<T: Into<MKTreeNode> + Clone>(&self, leaf: &T) -> bool

Check if the merkelized map value contains a leaf

source

fn compute_proof<T: Into<MKTreeNode> + Clone>( &self, leaves: &[T] ) -> StdResult<Option<MKMapProof<K>>>

Compute the proof for a set of values of the merkelized map

Object Safety§

This trait is not object safe.

Implementors§