Introduction to Structs, Traits, and Zero-Cost Abstractions in Rust

Introduction to Structs, Traits, and Zero-Cost Abstractions in Rust

Rust via YouTube Direct link

Zero cost abstraction!

8 of 22

8 of 22

Zero cost abstraction!

Class Central Classrooms beta

YouTube playlists curated by Class Central.

Classroom Contents

Introduction to Structs, Traits, and Zero-Cost Abstractions in Rust

Automatically move to the next video in the Classroom when playback concludes

  1. 1 Intro
  2. 2 Why Rust? (for me)
  3. 3 Introducing: structs
  4. 4 Add some methods
  5. 5 Using Point2D
  6. 6 Let's add a parameter
  7. 7 Thinking like a compiler
  8. 8 Zero cost abstraction!
  9. 9 What can we do with zero cost abstractions?
  10. 10 Append-only vectors
  11. 11 The recipe
  12. 12 A motivating example
  13. 13 How about a "Logger" type?
  14. 14 Different types of Loggers
  15. 15 Better idea: a Logger trait
  16. 16 PrintLogger implements Logger
  17. 17 Pass me a Logger, any Logger
  18. 18 Dynamic dispatch with trait objects
  19. 19 Trait objects prevent some optimizations
  20. 20 Generics!
  21. 21 Add logging to a fibonacci calculation
  22. 22 Generics vs trait objects

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.