Enum treediff::tools::ChangeType
source · pub enum ChangeType<'a, K, V: 'a> {
Removed(Vec<K>, &'a V),
Added(Vec<K>, &'a V),
Unchanged(Vec<K>, &'a V),
Modified(Vec<K>, &'a V, &'a V),
}
Expand description
Identifies a type of change at a given Key path, for use with the Recorder
.
The Key path is followed to know what happened with the Value V
contained in the variants.
Variants§
Removed(Vec<K>, &'a V)
The Value was removed
Added(Vec<K>, &'a V)
The Value was added
Unchanged(Vec<K>, &'a V)
No change was performed to the Value
Modified(Vec<K>, &'a V, &'a V)
The first Value was modified and became the second Value
Trait Implementations§
source§impl<'a, K: PartialEq, V: PartialEq + 'a> PartialEq for ChangeType<'a, K, V>
impl<'a, K: PartialEq, V: PartialEq + 'a> PartialEq for ChangeType<'a, K, V>
source§fn eq(&self, other: &ChangeType<'a, K, V>) -> bool
fn eq(&self, other: &ChangeType<'a, K, V>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a, K, V: 'a> StructuralPartialEq for ChangeType<'a, K, V>
Auto Trait Implementations§
impl<'a, K, V> Freeze for ChangeType<'a, K, V>
impl<'a, K, V> RefUnwindSafe for ChangeType<'a, K, V>where
V: RefUnwindSafe,
K: RefUnwindSafe,
impl<'a, K, V> Send for ChangeType<'a, K, V>
impl<'a, K, V> Sync for ChangeType<'a, K, V>
impl<'a, K, V> Unpin for ChangeType<'a, K, V>where
K: Unpin,
impl<'a, K, V> UnwindSafe for ChangeType<'a, K, V>where
V: RefUnwindSafe,
K: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more