SumType

Implements a safe discriminating union, aka sum type. Accepts the type Type as an enum listing the supporting types. Each enum filed name is considered as an alias for an actual type.

Members

Aliases

AllowedTypeNames
alias AllowedTypeNames = staticMap!(aliasToStr, EnumMembers!Type)
Undocumented in source.
AllowedTypes
alias AllowedTypes = staticMap!(StrToSymbol, AllowedTypeNames)

All allowed Tag types

Enums

allowed
eponymoustemplate allowed(T)

Check if type T is a supported type

Functions

empty
bool empty()

Returns true if no value is stored

type
Type type()

Returns the current Type

Manifest constants

emptyType
enum emptyType;

Value of the empty type

Meta