1 00:00:06,540 --> 00:00:08,370 - Hi, welcome to Lesson 10. 2 00:00:08,370 --> 00:00:09,660 In this lesson, we're going to see 3 00:00:09,660 --> 00:00:11,880 how to define structures in Rust. 4 00:00:11,880 --> 00:00:15,240 Structures or structs for short are similar to classes 5 00:00:15,240 --> 00:00:17,220 in object-oriented languages, 6 00:00:17,220 --> 00:00:20,100 but with some interesting differences. 7 00:00:20,100 --> 00:00:22,830 We'll begin by seeing how to define a simple structure 8 00:00:22,830 --> 00:00:25,020 that just contains data. 9 00:00:25,020 --> 00:00:26,730 Then we'll see how to create an instance 10 00:00:26,730 --> 00:00:27,873 and access its fields. 11 00:00:28,980 --> 00:00:31,470 After that, we'll see how to pass structure objects 12 00:00:31,470 --> 00:00:34,020 into a function by value or by reference 13 00:00:34,020 --> 00:00:36,720 and how to return a structure from a function 14 00:00:36,720 --> 00:00:39,153 again by value or by reference.