Closed rumatoest closed 4 years ago
I was thinking about this today too. The API is very clunky right now. I'm lacking expertise still in certain areas of Rust to know how to fix this.
Should I be returning mutable references rather than using Rc<RefCell<>>
?
well, stmt.borrow()
will still work, as long as you have a mutable accessor to handle setters for bound statements. If all you're using is getters, the single borrow should be good. Not necessarily sure that an Rc<>
is needed with a RefCell
in this case?
This is very related to issue #43
IMHO
borrow_mut()
does not looks good in terms of rust.What if there will be another approach like: