YoVDO

Rust - Generics, Traits, Lifetimes

Offered By: The Dev Method via YouTube

Tags

Rust Courses Generics Courses

Course Description

Overview

Dive into the world of Rust programming with this comprehensive 36-minute tutorial on generics, traits, and lifetimes. Explore the concept of generics as placeholders for other types, using the analogy of a can that can hold various food items. Learn how to implement generics in your own functions, structs, and methods, building upon your existing knowledge of the `Option` and `Result` types. Discover the power of traits in defining behavior generically and unravel the mystery behind lifetimes, a crucial Rust feature often encountered in compiler error messages. Follow along with practical examples, including the implementation of a "Largest Function," and gain insights into monomorphization, trait bounds, and lifetime rules. Enhance your understanding of these advanced Rust concepts with references to Chapter 17 of the Rust Programming book and additional resources for complex scenarios involving lifetimes.

Syllabus

Introduction
Removing Duplication
Syntax
Generics
Generics in Methods
Monomorphization
Traits
Traits as Parameters
Example
Largest Function
Lifetimes
Rules
Illusion rules
Illusion rules with methods


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