Introduction to Rust - Part 7: Generics and Traits

preview_player
Показать описание
This is the 7th in a series of videos that cover, step by step, learning to code using the Rust programming language.

In this video we'll cover generics and traits.

0:00 - Introduction
00:17 - Enum associated data
01:41 - Refactoring to use associated data
02:18 - The "if let" expression
03:28 - Preparing to use generics
05:18 - The "match" expression
07:58 - Making Item generic
09:29 - Introducing Traits
11:46 - The "Option" generic type
12:17 - Making a function generic
13:26 - The "Display" format trait
15:21 - In Summary
Рекомендации по теме
Комментарии
Автор

Thats the best explanation of traits and generics what i ever seen! Thank you so much. I am playing with rust almost two years, but still i missed the point why i should use generics and traits (i am more sysadmin, sometimes write a code i golang). Your playing with code helped me so much!

veldranecz
Автор

Thank you so much for making this series.

doudeman
Автор

Are you able to share the source code for reference?

KailashArora-in
Автор

I think this is where Rust becomes a programming language for programmers.

doctortex
Автор

could you explain this slowly with different example? Me and my friends are too confused.

suriyasampath