pub fn take<T>(&self, f: impl FnOnce(DBView<P>) -> T) -> T {
        let mut _db = self.db.borrow_mut();
        let db = _db.take().expect(line_error!());
        let retval = f(db);

        let req = send_until_success(CRequest::List).list();
        *_db = Some(DBView::load(self.key.clone(), req).expect(line_error!()));
        retval
    }
// supply the DBView to a function and update it after its been used.
supply the DBView to a function and update it after its been used.
supply the DBView to a function and update it after its been used .
pub fn take<T>(&self, f: impl FnOnce(DBView<P>) -> T) -> T {
        let mut _db = self.db.borrow_mut();
        let db = _db.take().expect(line_error!());
        let retval = f(db);
        let req = send_until_success(CRequest::List).list();
        *_db = Some(DBView::load(self.key.clone(), req).expect(line_error!()));
        retval
    }
pub fn take < T > ( & self , f : impl FnOnce ( DBView < P > ) -> T ) -> T { let mut _db = self . db . borrow_mut ( ) ; let db = _db . take ( ) . expect ( line_error ! ( ) ) ; let retval = f ( db ) ; let req = send_until_success ( CRequest :: List ) . list ( ) ; * _db = Some ( DBView :: load ( self . key . clone ( ) , req ) . expect ( line_error ! ( ) ) ) ; retval }
supply the DBView to a function and update it after its been used.
supply the DBView to a function and update it after its been used .
&self
f
impl FnOnce(DBView<P>) -> T