pub fn replace_document_if_match<IfMatch, Old, New>(
        &self,
        key: DocumentKey,
        new_document: DocumentUpdate<New>,
        if_match: IfMatch,
    ) -> Result<UpdatedDocument<Old, New>>
    where
        IfMatch: Into<String>,
        Old: 'static + DeserializeOwned,
        New: 'static + Serialize + DeserializeOwned + Debug,
    {
        let id = DocumentId::new(self.name(), key.unwrap());
        self.execute(ReplaceDocument::new(id, new_document).with_if_match(if_match))
    }
/// Replaces an existing document with new content if the match condition
/// is met.
///
/// # Arguments
///
/// * `key` : The key of the document to be replaced
/// * `new_document` : The new content of the document
/// * `if_match` : The match condition that must be met to replace a
///   document
Replaces an existing document with new content if the match condition
is met.
Replaces an existing document with new content if the match condition is met .
pub fn replace_document_if_match<IfMatch, Old, New>(
        &self,
        key: DocumentKey,
        new_document: DocumentUpdate<New>,
        if_match: IfMatch,
    ) -> Result<UpdatedDocument<Old, New>>
    where
        IfMatch: Into<String>,
        Old: 'static + DeserializeOwned,
        New: 'static + Serialize + DeserializeOwned + Debug,
    {
        let id = DocumentId::new(self.name(), key.unwrap());
        self.execute(ReplaceDocument::new(id, new_document).with_if_match(if_match))
    }
pub fn replace_document_if_match < IfMatch , Old , New > ( & self , key : DocumentKey , new_document : DocumentUpdate < New > , if_match : IfMatch , ) -> Result < UpdatedDocument < Old , New > > where IfMatch : Into < String > , Old : ' static + DeserializeOwned , New : ' static + Serialize + DeserializeOwned + Debug , { let id = DocumentId :: new ( self . name ( ) , key . unwrap ( ) ) ; self . execute ( ReplaceDocument :: new ( id , new_document ) . with_if_match ( if_match ) ) }
Replaces an existing document with new content if the match condition
is met.
Replaces an existing document with new content if the match condition is met .
&self
key
DocumentKey
new_document
DocumentUpdate<New>
if_match
IfMatch
&self
key
DocumentKey
new_document
DocumentUpdate<New>
if_match
IfMatch