pub fn replace_document_opt<Old, New>(
        &self,
        key: DocumentKey,
        new_document: DocumentUpdate<New>,
        options: DocumentReplaceOptions,
    ) -> Result<UpdatedDocument<Old, New>>
    where
        Old: 'static + DeserializeOwned,
        New: 'static + Serialize + DeserializeOwned + Debug,
    {
        let id = DocumentId::new(self.name(), key.unwrap());
        self.execute(ReplaceDocument::new(id, new_document).with_options(options))
    }
/// Replaces an existing document with new content. 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
/// * `options` : Additional options for the replace method
Replaces an existing document with new content. This function allows
to specify detailed options for the replace method.
Replaces an existing document with new content . This function allows to specify detailed options for the replace method .
pub fn replace_document_opt<Old, New>(
        &self,
        key: DocumentKey,
        new_document: DocumentUpdate<New>,
        options: DocumentReplaceOptions,
    ) -> Result<UpdatedDocument<Old, New>>
    where
        Old: 'static + DeserializeOwned,
        New: 'static + Serialize + DeserializeOwned + Debug,
    {
        let id = DocumentId::new(self.name(), key.unwrap());
        self.execute(ReplaceDocument::new(id, new_document).with_options(options))
    }
pub fn replace_document_opt < Old , New > ( & self , key : DocumentKey , new_document : DocumentUpdate < New > , options : DocumentReplaceOptions , ) -> Result < UpdatedDocument < Old , New > > where Old : ' static + DeserializeOwned , New : ' static + Serialize + DeserializeOwned + Debug , { let id = DocumentId :: new ( self . name ( ) , key . unwrap ( ) ) ; self . execute ( ReplaceDocument :: new ( id , new_document ) . with_options ( options ) ) }
Replaces an existing document with new content.
Replaces an existing document with new content .
&self
key
DocumentKey
new_document
DocumentUpdate<New>
options
DocumentReplaceOptions
&self
key
DocumentKey
new_document
DocumentUpdate<New>
options
DocumentReplaceOptions