1 00:00:06,510 --> 00:00:09,210 - Hello again and welcome to lesson four. 2 00:00:09,210 --> 00:00:12,630 In this lesson, we're going to talk all about enums. 3 00:00:12,630 --> 00:00:14,100 An enum is a data type 4 00:00:14,100 --> 00:00:17,100 that only permits a restricted set of values. 5 00:00:17,100 --> 00:00:20,010 Enums are an important part of Rust, as you'll see, 6 00:00:20,010 --> 00:00:23,520 and you can't get very far without knowing how they work. 7 00:00:23,520 --> 00:00:25,319 So we'll begin by showing the syntax 8 00:00:25,319 --> 00:00:27,900 for defining and using simple enums, 9 00:00:27,900 --> 00:00:29,820 and how to avoid warning messages 10 00:00:29,820 --> 00:00:31,220 when you're getting started. 11 00:00:32,220 --> 00:00:34,080 Then we'll take it a step further 12 00:00:34,080 --> 00:00:37,260 and see how to define enums that convey data values. 13 00:00:37,260 --> 00:00:40,893 We'll explore the syntax and discuss why this is useful. 14 00:00:42,000 --> 00:00:45,240 We'll wrap up the lesson by discussing two standard enums 15 00:00:45,240 --> 00:00:48,390 in the vast library, the option enum, 16 00:00:48,390 --> 00:00:51,420 which represents a possibly empty valley, 17 00:00:51,420 --> 00:00:52,770 and the result enum, 18 00:00:52,770 --> 00:00:54,970 which represents a possible error condition.