pub struct Update {
pub upsert: Option<Value>,
pub doc_as_upsert: Option<bool>,
pub script: Option<Script>,
pub doc: Option<Value>,
pub detect_noop: Option<bool>,
pub scripted_upsert: Option<bool>,
pub source: Option<SourceConfig>,
}Expand description
Update
The request definition requires either script or partial doc
Fields§
§upsert: Option<Value>If the document does not already exist, the contents of ‘upsert’ are inserted as a new document. If the document exists, the ‘script’ is executed.
doc_as_upsert: Option<bool>Set to true to use the contents of ‘doc’ as the value of ‘upsert’
script: Option<Script>§doc: Option<Value>A partial update to an existing document.
detect_noop: Option<bool>Set to false to disable setting result in the response
to noop if no change to the document occurred.
scripted_upsert: Option<bool>Set to true to execute the script whether or not the document exists.
source: Option<SourceConfig>Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Update
impl<'de> Deserialize<'de> for Update
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 Update
Auto Trait Implementations§
impl Freeze for Update
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnsafeUnpin for Update
impl UnwindSafe for Update
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