pub enum PrimitiveDiff<T: Diffable> {
Changed {
old: T,
new: T,
},
Unchanged,
}Expand description
Enum representing the difference between two primitive values.
Variants§
Changed
Indicates that the value has changed, storing the old and new values.
Unchanged
Indicates that the value has not changed.
Trait Implementations§
Source§impl<T: Diffable> Changeable for PrimitiveDiff<T>
impl<T: Diffable> Changeable for PrimitiveDiff<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> PartialEq for PrimitiveDiff<T>
impl<T> PartialEq for PrimitiveDiff<T>
Auto Trait Implementations§
impl<T> Freeze for PrimitiveDiff<T>where
T: Freeze,
impl<T> RefUnwindSafe for PrimitiveDiff<T>where
T: RefUnwindSafe,
impl<T> Send for PrimitiveDiff<T>where
T: Send,
impl<T> Sync for PrimitiveDiff<T>where
T: Sync,
impl<T> Unpin for PrimitiveDiff<T>where
T: Unpin,
impl<T> UnwindSafe for PrimitiveDiff<T>where
T: 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