- Hello again and welcome to lesson four.
In this lesson, we're going to talk all about enums.
An enum is a data type
that only permits a restricted set of values.
Enums are an important part of Rust, as you'll see,
and you can't get very far without knowing how they work.
So we'll begin by showing the syntax
for defining and using simple enums,
and how to avoid warning messages
when you're getting started.
Then we'll take it a step further
and see how to define enums that convey data values.
We'll explore the syntax and discuss why this is useful.
We'll wrap up the lesson by discussing two standard enums
in the vast library, the option enum,
which represents a possibly empty valley,
and the result enum,
which represents a possible error condition.