pub enum JsonOperation {
Set {
path: String,
old_value: Option<Value>,
new_value: Value,
},
Delete {
path: String,
old_value: Value,
},
ArrayInsert {
array_path: String,
index: usize,
value: Value,
},
ArrayRemove {
array_path: String,
index: usize,
value: Value,
},
}Expand description
A JSON operation that can be undone.
Variants§
Set
Set a value at a path.
Delete
Delete a value at a path.
ArrayInsert
Insert into an array.
ArrayRemove
Remove from an array.
Implementations§
Source§impl JsonOperation
impl JsonOperation
Trait Implementations§
Source§impl Clone for JsonOperation
impl Clone for JsonOperation
Source§fn clone(&self) -> JsonOperation
fn clone(&self) -> JsonOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonOperation
impl Debug for JsonOperation
Source§impl<'de> Deserialize<'de> for JsonOperation
impl<'de> Deserialize<'de> for JsonOperation
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 PartialEq for JsonOperation
impl PartialEq for JsonOperation
Source§impl Serialize for JsonOperation
impl Serialize for JsonOperation
impl StructuralPartialEq for JsonOperation
Auto Trait Implementations§
impl Freeze for JsonOperation
impl RefUnwindSafe for JsonOperation
impl Send for JsonOperation
impl Sync for JsonOperation
impl Unpin for JsonOperation
impl UnwindSafe for JsonOperation
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