Module enums

Source
Expand description

A concrete implementation of the type Or that represents values of multiple types.

Different enum types OrX (where X is the number of types the enum can contain) are provided depending on the number of types it can contain.

The implementation of these enums includes several basic function such as is_tx for assertion and as_tx for cast, and also have some util functions, like map, fold.

Enums§

Or2
Or2 is an enum representing a value that can be either of 2 types, T1 … T2.
Or3
Or3 is an enum representing a value that can be either of 3 types, T1 … T3.
Or4
Or4 is an enum representing a value that can be either of 4 types, T1 … T4.
Or5
Or5 is an enum representing a value that can be either of 5 types, T1 … T5.
Or6
Or6 is an enum representing a value that can be either of 6 types, T1 … T6.
Or7
Or7 is an enum representing a value that can be either of 7 types, T1 … T7.
Or8
Or8 is an enum representing a value that can be either of 8 types, T1 … T8.
Or9
Or9 is an enum representing a value that can be either of 9 types, T1 … T9.