Skip to content
masterclass Buddy

Rust · Class

RefCell

RefCell<T> allows shared references to access and change an inner value. It checks borrowing rules at runtime.

Last updated

Since
1.0.0

Syntax

pub struct RefCell<T: ?Sized> { /* private fields */ }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Ref
  • RefMut
  • BorrowError
  • BorrowMutError
  • Cell
  • OnceCell
  • RwLock
  • Mutex

Source: RefCell in std::cell - Rust. Checked 2026-11-03.