3 Ways to Polymorphism | Advanced Rust Part 2

Опубликовано: 31 Март 2026
на канале: Green Tea Coding
7,207
393

Watch the rest of this series:    • Advanced Rust  
New to Rust? Check out my fundamentals series:
   • How to become a Rust Developer  

We explore static and dynamic dispatch as ways to polymorphism in Rust. As always, we cover the fundamentals, memory layout and performance implications.

Find me elsewhere:
🐘 Mastodon: https://mastodon.social/@GreenTeaCoding

00:00 Intro
00:35 Static dispatch example
08:02 Need for dynamic dispatch
08:30 Dynamic dispatch via refs
13:20 Static vs dynamic dispatch
14:20 Cost of dynamic dispatch
15:14 Box
18:27 Summary
19:49 Traits vs Inheritance

#rustlang #coding #tutorial