Skip to content

Glossary: Software Design Patterns in Rust

enum

Also written: enums

A Rust type whose value is exactly one of several named variants. Enums suit things like a customer `Kind` or an order `Status`, because no invalid value can exist.

Where the book teaches it

Related terms

State machine