pub trait MapDiffer {
type Ok;
type Err;
// Required methods
fn diff_entry<K, V>(&mut self, key: &K, a: &V, b: &V)
where K: ?Sized + Debug,
V: ?Sized + Diff;
fn only_in_left<K, V>(&mut self, key: &K, a: &V)
where K: ?Sized + Debug,
V: ?Sized + Diff;
fn only_in_right<K, V>(&mut self, key: &K, b: &V)
where K: ?Sized + Debug,
V: ?Sized + Diff;
fn end(self) -> Result<Self::Ok, Self::Err>;
}
Expand description
A type that can do something with information about differences in a map-like, key-value type.
Required Associated Types§
Required Methods§
Sourcefn diff_entry<K, V>(&mut self, key: &K, a: &V, b: &V)
fn diff_entry<K, V>(&mut self, key: &K, a: &V, b: &V)
Both maps contain entries for key
; check them for differences.
Sourcefn only_in_left<K, V>(&mut self, key: &K, a: &V)
fn only_in_left<K, V>(&mut self, key: &K, a: &V)
Key key
is only present in the left map, with value a
.
Sourcefn only_in_right<K, V>(&mut self, key: &K, b: &V)
fn only_in_right<K, V>(&mut self, key: &K, b: &V)
Key key
is only present in the right map, with value b
.
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.