pub enum UpdateOp {
Set(String, Value),
Unset(String),
Inc(String, f64),
Mul(String, f64),
Rename(String, String),
CurrentDate(String),
Min(String, Value),
Max(String, Value),
SetOnInsert(String, Value),
}Expand description
MongoDB update operators for documents.
Variants§
Set(String, Value)
Set a field value ($set).
Unset(String)
Unset a field ($unset).
Inc(String, f64)
Increment a numeric field ($inc).
Mul(String, f64)
Multiply a numeric field ($mul).
Rename(String, String)
Rename a field ($rename).
CurrentDate(String)
Set field to current date ($currentDate).
Min(String, Value)
Set minimum value ($min).
Max(String, Value)
Set maximum value ($max).
SetOnInsert(String, Value)
Set on insert only ($setOnInsert).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UpdateOp
impl<'de> Deserialize<'de> for UpdateOp
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 UpdateOp
Auto Trait Implementations§
impl Freeze for UpdateOp
impl RefUnwindSafe for UpdateOp
impl Send for UpdateOp
impl Sync for UpdateOp
impl Unpin for UpdateOp
impl UnwindSafe for UpdateOp
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