pub trait MKMapValue<K: MKMapKey>:
Clone
+ TryInto<MKTreeNode>
+ TryFrom<MKTreeNode> {
// Required methods
fn compute_root(&self) -> StdResult<MKTreeNode>;
fn contains<T: Into<MKTreeNode> + Clone>(&self, leaf: &T) -> bool;
fn can_compute_proof(&self) -> 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§
Sourcefn compute_root(&self) -> StdResult<MKTreeNode>
fn compute_root(&self) -> StdResult<MKTreeNode>
Get the root of the merkelized map value
Sourcefn contains<T: Into<MKTreeNode> + Clone>(&self, leaf: &T) -> bool
fn contains<T: Into<MKTreeNode> + Clone>(&self, leaf: &T) -> bool
Check if the merkelized map value contains a leaf
Sourcefn can_compute_proof(&self) -> bool
fn can_compute_proof(&self) -> bool
Can the merkelized map value compute a proof
Sourcefn compute_proof<T: Into<MKTreeNode> + Clone>(
&self,
leaves: &[T],
) -> StdResult<Option<MKMapProof<K>>>
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.