Skip to main content

One doc tagged with "option"

View all tags

The `Option` Enum: Handling the Absence of a Value

In the previous article, we learned how to define our own enums. Now, we're going to look at a very special and common enum from the Rust standard library: Option. The Option enum is Rust's answer to the problem of null values, which are a common source of bugs in many other programming languages.