Tour of Rust Table of Contents

Enumerations With Data

enum elements can also have one or more data types allowing them to behave like union from C.

When an enum is pattern matched using match, you can bind a variable name to each data value.

Memory details of enum:

Other details: