pub trait TryApplyDiff<K, V>
where K: Ord + Clone, V: Clone,
{ type DiffType; type Error; // Required method fn try_apply(&mut self, diff: Self::DiffType) -> Result<(), Self::Error>; }
Expand description

A trait for applying the difference between two objects with the possibility of failure.

Required Associated Types§

type DiffType

The type that describes the difference between two objects.

type Error

An error type that can be returned if the changes cannot be applied.

Required Methods§

fn try_apply(&mut self, diff: Self::DiffType) -> Result<(), Self::Error>

Applies the provided changes described by Self::DiffType to the object implementing this trait. Returns an error if the changes cannot be applied.

Implementors§

§

impl TryApplyDiff<RpoDigest, StoreNode> for SimpleSmt

§

type Error = MerkleError

§

type DiffType = MerkleTreeDelta

§

impl<T> TryApplyDiff<RpoDigest, StoreNode> for MerkleStore<T>
where T: KvMap<RpoDigest, StoreNode>,

§

type Error = MerkleError

§

type DiffType = MerkleStoreDelta