Skip to content

Interior Mutability practice problems in Rust

Difficulty:
Category:
Tag:

Showing 8 of 8

Status Title Difficulty
Build Rc<T> and RefCell<T> from scratch Hard
`Cell<T>`: mutation by moving values in and out Medium
Interior mutability: moving the check from compile time to run time Medium
`OnceCell`: write-once interior mutability Medium
`RefCell<T>`: borrowing checked at runtime Medium
Sync: T is Sync exactly when &T is Send Medium
`UnsafeCell`: the only legal path to interior mutability Medium
When `RefCell` panics: re-entrancy and borrows held too long Hard