pub fn insert_document_return_new<D, T>(&self, document: D) -> Result<Document<T>>
    where
        D: Into<NewDocument<T>>,
        T: 'static + Serialize + DeserializeOwned + Debug,
    {
        self.execute(InsertDocumentReturnNew::new(self.name(), document.into()))
    }
/// Inserts a new document into this collection and returns the newly
/// created document.
Inserts a new document into this collection and returns the newly
created document.
Inserts a new document into this collection and returns the newly created document .
pub fn insert_document_return_new<D, T>(&self, document: D) -> Result<Document<T>>
    where
        D: Into<NewDocument<T>>,
        T: 'static + Serialize + DeserializeOwned + Debug,
    {
        self.execute(InsertDocumentReturnNew::new(self.name(), document.into()))
    }
pub fn insert_document_return_new < D , T > ( & self , document : D ) -> Result < Document < T > > where D : Into < NewDocument < T > > , T : ' static + Serialize + DeserializeOwned + Debug , { self . execute ( InsertDocumentReturnNew :: new ( self . name ( ) , document . into ( ) ) ) }
Inserts a new document into this collection and returns the newly
created document.
Inserts a new document into this collection and returns the newly created document .
&self
document
D
&self
document
D