Skip to content

Glossary: Rust Basics

Variant

Also written: variants

One of the fixed choices an enum can be, named with the enum, like `Grind::Espresso`. A variant can carry data, such as `Van(u32)`.

Where the book teaches it

Related terms

Enummatch