Skip to content

Refcell practice problems in Rust

Difficulty:
Category:
Tag:

Showing 11 of 11

Status Title Difficulty
Bake-off: the same tree, an arena and an `Rc` graph Hard
Build `Cell<T>` and `RefCell<T>` from scratch Hard
Build Rc<T> and RefCell<T> from scratch Hard
Interior mutability: moving the check from compile time to run time Medium
Laziness: prove the pipeline interleaves Easy
RAII: build your own guard Medium
`Rc<RefCell<T>>`: the workhorse, and when it is a smell Hard
`RefCell<T>`: borrowing checked at runtime Medium
Reference cycles leak memory Hard
`Weak<T>`: non-owning references that break cycles Hard
When `RefCell` panics: re-entrancy and borrows held too long Hard