/// Atomically finds up to one document in the collection matching `filter` and updates it.
/// Both `Document` and `Vec<Document>` implement `Into<UpdateModifications>`, so either can be
/// passed in place of constructing the enum case. Note: pipeline updates are only supported
/// in MongoDB 4.2+.
///
/// 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.
Atomically finds up to one document in the collection matching `filter` and updates it.

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.
Atomically finds up to one document in the collection matching ` filter ` and updates it . 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 find_one_and_update(
        &self,
        filter: Document,
        update: impl Into<UpdateModifications>,
        options: impl Into<Option<FindOneAndUpdateOptions>>,
    ) -> Result<Option<T>> {
        RUNTIME.block_on(self.async_collection.find_one_and_update(
            filter,
            update.into(),
            options.into(),
        ))
    }
pub fn find_one_and_update ( & self , filter : Document , update : impl Into < UpdateModifications > , options : impl Into < Option < FindOneAndUpdateOptions > > , ) -> Result < Option < T > > { RUNTIME . block_on ( self . async_collection . find_one_and_update ( filter , update . into ( ) , options . into ( ) , ) ) }
Atomically finds up to one document in the collection matching `filter` and updates it.
Atomically finds up to one document in the collection matching ` filter ` and updates it .
&self
filter
Document
update
impl Into<UpdateModifications>
options
impl Into<Option<FindOneAndUpdateOptions>>