
Box<T> for Heap Allocation
Understand what Box<T> is, why Rust uses heap allocation, and the three main scenarios where Box<T> solves ownership and size problems.
Deref Trait and Deref Coercion
Learn how to implement the Deref trait to make custom types behave like references and how Rust’s deref coercion automatically matches types in function arguments.
The Drop Trait for Cleanup
Learn how to run custom code automatically when values go out of scope in Rust, implementing destructor-like cleanup for resource management with the Drop trait
Rc<T>, the Reference Counted Smart Pointer
Understanding shared ownership in Rust through Rc<T>, how reference counting works, and when to use it in single-threaded scenarios
RefCell<T> and the Interior Mutability Pattern
Understand how RefCell<T> moves Rust borrowing checks to runtime, enabling interior mutability for patterns like mock objects, and how to combine it with Rc<T> for shared mutable data while avoiding memory leaks with Weak<T>
Shared Ownership with Rc and Arc
Understand how Rc and Arc enable multiple owners for the same heap data in Rust, and why thread safety is the key difference between them
Smart Pointer Recap - Choosing the Right Pointer
A decision guide for choosing the correct Rust smart pointer for your ownership and mutation needs, with a comparison of Box, Rc, Arc, RefCell, and Mutex