fn close(&mut self) -> PyResult<()> {
        if let Some(db) = &self.db {
            match db.flush_opt(&self.flush_opt.to_rust()) {
                Ok(_) => Ok(drop(self.db.take().unwrap())),
                Err(e) => {
                    drop(self.db.take().unwrap());
                    Err(PyException::new_err(e.to_string()))
                }
            }
        } else {
            Err(PyException::new_err("DB already closed"))
        }
    }
/// flush mem-table, drop database
flush mem-table, drop database
flush mem - table drop database
fn close(&mut self) -> PyResult<()> {
        if let Some(db) = &self.db {
            match db.flush_opt(&self.flush_opt.to_rust()) {
                Ok(_) => Ok(drop(self.db.take().unwrap())),
                Err(e) => {
                    drop(self.db.take().unwrap());
                    Err(PyException::new_err(e.to_string()))
                }
            }
        } else {
            Err(PyException::new_err("DB already closed"))
        }
    }
fn close ( & mut self ) -> PyResult < ( ) > { if let Some ( db ) = & self . db { match db . flush_opt ( & self . flush_opt . to_rust ( ) ) { Ok ( _ ) => Ok ( drop ( self . db . take ( ) . unwrap ( ) ) ) , Err ( e ) => { drop ( self . db . take ( ) . unwrap ( ) ) ; Err ( PyException :: new_err ( e . to_string ( ) ) ) } } } else { Err ( PyException :: new_err ( " " ) ) } }
flush mem-table, drop database
flush mem - table drop database
&mut self
&mut self