Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Rust - RefCell

The Dev Method via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the concept of interior mutability in Rust through a 20-minute video tutorial focusing on RefCell. Learn how to mutate data even with immutable references, circumventing Rust's borrowing rules at runtime. Discover the Interior Mutability Pattern and its implementation using RefCell. Dive into practical use cases, such as creating mock objects, and understand how RefCell keeps track of borrows during program execution. Examine the combination of Rc and RefCell for managing multiple owners of mutable data. Gain insights into unsafe Rust, RefCell's borrow_mut method, and related concepts like Mutex for thread-safe data access.

Syllabus

intro
Enforcing Borrowing Rules at Runtime with RefCell
Interior Mutability: A Mutable Borrow to an Immutable Value
A Use Case for Interior Mutability: Mock Objects
Keeping Track of Borrows at Runtime with RefCell
Having Multiple Owners of Mutable Data by Combining Rc and RefCell
Outro

Taught by

The Dev Method

Reviews

Start your review of Rust - RefCell

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.