YoVDO

Rust - RefCell

Offered By: The Dev Method via YouTube

Tags

Rust Courses

Course Description

Overview

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

Related Courses

The Rust Programming Language
Udemy
Rust for Beginners: Learn Rust in 4 Hours
Udemy
Rust For Undergrads
Udemy
Take your first steps with Rust
Microsoft via Microsoft Learn
Rust Fundamentals
Pluralsight