pub fn replace_document_if_match_opt<IfMatch, Old, New>(
        &self,
        key: DocumentKey,
        new_document: DocumentUpdate<New>,
        if_match: IfMatch,
        options: DocumentReplaceOptions,
    ) -> 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)
                .with_options(options),
        )
    }
/// Replaces an existing document with new content if the match condition
/// is met. This function allows to specify detailed options for the
/// replace method.
///
/// # 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
/// * `options` : Additional options for the replace method
Replaces an existing document with new content if the match condition
is met. This function allows to specify detailed options for the
replace method.
Replaces an existing document with new content if the match condition is met . This function allows to specify detailed options for the replace method .
pub fn replace_document_if_match_opt<IfMatch, Old, New>(
        &self,
        key: DocumentKey,
        new_document: DocumentUpdate<New>,
        if_match: IfMatch,
        options: DocumentReplaceOptions,
    ) -> 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)
                .with_options(options),
        )
    }
pub fn replace_document_if_match_opt < IfMatch , Old , New > ( & self , key : DocumentKey , new_document : DocumentUpdate < New > , if_match : IfMatch , options : DocumentReplaceOptions , ) -> 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 ) . with_options ( options ) , ) }
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
options
DocumentReplaceOptions
&self
key
DocumentKey
new_document
DocumentUpdate<New>
if_match
IfMatch
options
DocumentReplaceOptions