pub enum DiffOp {
SetValue {
path: String,
old: DiffValue,
new: DiffValue,
},
AddKey {
path: String,
key: String,
value: DiffValue,
},
RemoveKey {
path: String,
key: String,
old_value: DiffValue,
},
AddElement {
path: String,
index: usize,
value: DiffValue,
},
RemoveElement {
path: String,
index: usize,
old_value: DiffValue,
},
AddToSet {
path: String,
value: DiffValue,
},
RemoveFromSet {
path: String,
old_value: DiffValue,
},
ChangeType {
path: String,
old_type: String,
new_type: String,
},
}Expand description
A single structured change operation within a diff.
Variants§
SetValue
A value was changed at this path.
AddKey
A key was added to a map.
RemoveKey
A key was removed from a map.
AddElement
An element was added to a list.
RemoveElement
An element was removed from a list.
AddToSet
An element was added to a set.
RemoveFromSet
An element was removed from a set.
ChangeType
The type of a node changed (e.g., map became a list).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DiffOp
impl<'de> Deserialize<'de> for DiffOp
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
impl StructuralPartialEq for DiffOp
Auto Trait Implementations§
impl Freeze for DiffOp
impl RefUnwindSafe for DiffOp
impl Send for DiffOp
impl Sync for DiffOp
impl Unpin for DiffOp
impl UnsafeUnpin for DiffOp
impl UnwindSafe for DiffOp
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