pub trait TryApplyDiff<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§

source

type DiffType

The type that describes the difference between two objects.

source

type Error

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

Required Methods§

source

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§