/// Inserts `doc` into the collection using the provided `ClientSession`.
///
/// 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.
Inserts `doc` into the collection using the provided `ClientSession`.
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.
Inserts ` doc ` into the collection using the provided ` ClientSession ` . 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 insert_one_with_session(
        &self,
        doc: impl Borrow<T>,
        options: impl Into<Option<InsertOneOptions>>,
        session: &mut ClientSession,
    ) -> Result<InsertOneResult> {
        RUNTIME.block_on(self.async_collection.insert_one_with_session(
            doc.borrow(),
            options.into(),
            &mut session.async_client_session,
        ))
    }
pub fn insert_one_with_session ( & self , doc : impl Borrow < T > , options : impl Into < Option < InsertOneOptions > > , session : & mut ClientSession , ) -> Result < InsertOneResult > { RUNTIME . block_on ( self . async_collection . insert_one_with_session ( doc . borrow ( ) , options . into ( ) , & mut session . async_client_session , ) ) }
Inserts `doc` into the collection using the provided `ClientSession`.
Inserts ` doc ` into the collection using the provided ` ClientSession ` .
&self
doc
impl Borrow<T>
options
impl Into<Option<InsertOneOptions>>
session
&mut ClientSession