pub enum CollectionDiffEntry<T: Diffable> {
Removed(T),
Added(T),
Changed(<T as Diffable>::Repr),
Unchanged,
}Expand description
Enum representing a difference in collections such as HashMap or Vec.
Variants§
Removed(T)
Indicates that an item was removed from the collection.
Added(T)
Indicates that an item was added to the collection.
Changed(<T as Diffable>::Repr)
Indicates that an item has changed.
Unchanged
Indicates that an item has not changed.
Trait Implementations§
Source§impl<T: Diffable> Changeable for CollectionDiffEntry<T>
impl<T: Diffable> Changeable for CollectionDiffEntry<T>
Source§fn is_changed(&self) -> bool
fn is_changed(&self) -> bool
Checks if the object has changed.
Source§fn is_unchanged(obj: &Self) -> bool
fn is_unchanged(obj: &Self) -> bool
Static method to check if an object has not changed.
Source§impl<T: Diffable> Default for CollectionDiffEntry<T>
impl<T: Diffable> Default for CollectionDiffEntry<T>
Source§fn default() -> CollectionDiffEntry<T>
fn default() -> CollectionDiffEntry<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for CollectionDiffEntry<T>where
T: Deserialize<'de> + Diffable,
impl<'de, T> Deserialize<'de> for CollectionDiffEntry<T>where
T: Deserialize<'de> + Diffable,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> PartialEq for CollectionDiffEntry<T>
impl<T> PartialEq for CollectionDiffEntry<T>
Auto Trait Implementations§
impl<T> Freeze for CollectionDiffEntry<T>
impl<T> RefUnwindSafe for CollectionDiffEntry<T>
impl<T> Send for CollectionDiffEntry<T>
impl<T> Sync for CollectionDiffEntry<T>
impl<T> Unpin for CollectionDiffEntry<T>
impl<T> UnwindSafe for CollectionDiffEntry<T>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more