pub fn replace_document<Old, New>(
        &self,
        key: DocumentKey,
        new_document: DocumentUpdate<New>,
    ) -> 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))
    }
/// Replaces an existing document with new content.
///
/// # Arguments
///
/// * `key` : The key of the document to be replaced
/// * `new_document` : The new content of the document
Replaces an existing document with new content.
Replaces an existing document with new content .
pub fn replace_document<Old, New>(
        &self,
        key: DocumentKey,
        new_document: DocumentUpdate<New>,
    ) -> 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))
    }
pub fn replace_document < Old , New > ( & self , key : DocumentKey , new_document : DocumentUpdate < New > , ) -> 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 ) ) }
Replaces an existing document with new content.
Replaces an existing document with new content .
&self
key
DocumentKey
new_document
DocumentUpdate<New>
&self
key
DocumentKey
new_document
DocumentUpdate<New>