Skip to content
masterclass Buddy

Rust · Class

Rc

Rc<T> is a single-threaded smart pointer for shared ownership of one heap value. Cloning Rc shares the allocation; the value is dropped after its last strong Rc is dropped.

Last updated

Since
1.0.0

Syntax

pub fn new(value: T) -> Rc<T>

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

Subscribe
  • Weak
  • Arc
  • Cell
  • RefCell
  • Rc::clone
  • Rc::downgrade

Source: Rc in std::rc - Rust. Checked 2026-11-03.