1 00:00:06,600 --> 00:00:08,820 - Hello. Welcome to Lesson 12. 2 00:00:08,820 --> 00:00:11,790 In this lesson, we look at traits which are similar 3 00:00:11,790 --> 00:00:14,790 to interfaces in other OO languages. 4 00:00:14,790 --> 00:00:17,970 We'll begin with a look at how to define a trait 5 00:00:17,970 --> 00:00:20,520 and how to implement it in a structure. 6 00:00:20,520 --> 00:00:23,130 Then we'll see how to use traits to achieve inheritance 7 00:00:23,130 --> 00:00:25,260 and polymorphism in Rust. 8 00:00:25,260 --> 00:00:28,200 We'll also see how a trait can inherit from other traits 9 00:00:28,200 --> 00:00:30,483 to achieve a hierarchy of functionality. 10 00:00:31,620 --> 00:00:33,120 For the remainder of the lesson, 11 00:00:33,120 --> 00:00:35,010 we'll take a look at some of the standard traits 12 00:00:35,010 --> 00:00:37,530 in the Rust Library, and we'll see how and why 13 00:00:37,530 --> 00:00:40,350 to implement them in your structures. 14 00:00:40,350 --> 00:00:44,100 We'll see the display trait, the debug trait, 15 00:00:44,100 --> 00:00:48,570 the drop trait, the clone trait, and the copy trait. 16 00:00:48,570 --> 00:00:49,980 Knowing about these traits 17 00:00:49,980 --> 00:00:51,930 will give you a much better understanding 18 00:00:51,930 --> 00:00:54,513 about how Rust works internally as a language.