Skip to content

Glossary: Rust Beyond the Basics

RefCell

Also written: RefCell<T>, borrow_mut

A type that checks the borrow rules while the program runs instead of at compile time. `.borrow()` reads and `.borrow_mut()` writes, and it panics if the rules are broken.

Where the book teaches it

Related terms

interior mutability