modify_async

Function modify_async 

Source
pub async fn modify_async<D: CosmosObject + DeserializeOwned, P: Into<PartitionKeyIntermediate>, F: Fn(D) -> Fut, C: ToString, S: ToString, Fut: Future<Output = Result<D, Rejection>>>(
    collection_name: C,
    pk: P,
    document_id: S,
    transform: F,
) -> Result<D, CosmosErrorStruct>
Expand description

Modifies a document in cosmos by applying transform async closure on the existing document and then inserting the returned document and returning the transformed document if successful If the transform closure fails then no insertion is performed and the error it fails with is returned