4 ms·
They are tagged unions right? "Enum" is not the worst term here. In fact you are enumerating the variants. It's only slightly misleading. It implies that you'r
by dgb23 3y ago
They are tagged unions right?
"Enum" is not the worst term here. In fact you are enumerating the variants. It's only slightly misleading. It implies that you're comparing an integer.
There is an actual enum backing it to encode the choice (tag), and a union to encode the data (if it has data). Or at least that's what I would expect.
"Variant" is used in Rust lingo to name the variants, not the whole type.