/// Replaces up to one document matching `query` in the collection with `replacement`.
///
/// This operation will retry once upon failure if the connection and encountered error support
/// retryability. See the documentation
/// [here](https://docs.mongodb.com/manual/core/retryable-writes/) for more information on
/// retryable writes.
Replaces up to one document matching `query` in the collection with `replacement`.
This operation will retry once upon failure if the connection and encountered error support
retryability. See the documentation
[here] for more information on
retryable writes.
Replaces up to one document matching ` query ` in the collection with ` replacement ` . This operation will retry once upon failure if the connection and encountered error support retryability . See the documentation [ here ] for more information on retryable writes .
pub fn replace_one(
        &self,
        query: Document,
        replacement: impl Borrow<T>,
        options: impl Into<Option<ReplaceOptions>>,
    ) -> Result<UpdateResult> {
        RUNTIME.block_on(self.async_collection.replace_one(
            query,
            replacement.borrow(),
            options.into(),
        ))
    }
pub fn replace_one ( & self , query : Document , replacement : impl Borrow < T > , options : impl Into < Option < ReplaceOptions > > , ) -> Result < UpdateResult > { RUNTIME . block_on ( self . async_collection . replace_one ( query , replacement . borrow ( ) , options . into ( ) , ) ) }
Replaces up to one document matching `query` in the collection with `replacement`.
Replaces up to one document matching ` query ` in the collection with ` replacement ` .
&self
query
Document
replacement
impl Borrow<T>
options
impl Into<Option<ReplaceOptions>>