pub fn update_write<F, R, E>(&self, f: F) -> Result<R, E>
    where
        F: FnOnce(&mut UpdateWriter) -> Result<R, E>,
        E: From<Error>,
    {
        let mut writer = self.update_write_txn()?;
        let result = f(&mut writer)?;
        writer.commit().map_err(Error::Heed)?;
        Ok(result)
    }
/// Calls f providing it with a writer to the main database. After f is called, makes sure the
/// transaction is commited. Returns whatever result f returns.
Calls f providing it with a writer to the main database. After f is called, makes sure the
transaction is commited. Returns whatever result f returns.
Calls f providing it with a writer to the main database . After f is called makes sure the transaction is commited . Returns whatever result f returns .
pub fn update_write<F, R, E>(&self, f: F) -> Result<R, E>
    where
        F: FnOnce(&mut UpdateWriter) -> Result<R, E>,
        E: From<Error>,
    {
        let mut writer = self.update_write_txn()?;
        let result = f(&mut writer)?;
        writer.commit().map_err(Error::Heed)?;
        Ok(result)
    }
pub fn update_write < F , R , E > ( & self , f : F ) -> Result < R , E > where F : FnOnce ( & mut UpdateWriter ) -> Result < R , E > , E : From < Error > , { let mut writer = self . update_write_txn ( ) ? ; let result = f ( & mut writer ) ? ; writer . commit ( ) . map_err ( Error :: Heed ) ? ; Ok ( result ) }
Calls f providing it with a writer to the main database.
Calls f providing it with a writer to the main database .
&self
f
F
&self
f
F