pub enum DocMutation {
Set {
path: String,
value: Value,
},
Del {
path: String,
},
Incr {
path: String,
delta: f64,
},
Push {
path: String,
value: Value,
},
Pull {
path: String,
value: Value,
},
}Expand description
Mutation operation used by DocEngine::update.
Variants§
Set
Set a field path to a JSON value, creating missing intermediate objects.
Fields
Del
Delete one field path when present.
Incr
Increment an existing numeric field by delta.
Push
Append one JSON value to an array field, creating the array when missing.
Pull
Remove all array items that exactly match the supplied value.
Trait Implementations§
Source§impl Clone for DocMutation
impl Clone for DocMutation
Source§fn clone(&self) -> DocMutation
fn clone(&self) -> DocMutation
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 DocMutation
impl Debug for DocMutation
Source§impl PartialEq for DocMutation
impl PartialEq for DocMutation
impl StructuralPartialEq for DocMutation
Auto Trait Implementations§
impl Freeze for DocMutation
impl RefUnwindSafe for DocMutation
impl Send for DocMutation
impl Sync for DocMutation
impl Unpin for DocMutation
impl UnsafeUnpin for DocMutation
impl UnwindSafe for DocMutation
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