SumType

Undocumented in source.
struct SumType (
TypeArgs...
) if (
is(NoDuplicates!TypeArgs == TypeArgs) &&
TypeArgs.length > 0
) {}

Constructors

this
this(T value)
this(const(T) value)
this(immutable(T) value)

Constructs a SumType holding a specific value.

this
this(const(T) value)
Undocumented in source.
this
this(immutable(T) value)
Undocumented in source.
this
this(SumType other)
this(const(SumType) other)
this(immutable(SumType) other)

Constructs a SumType that's a copy of another SumType

this
this()
Undocumented in source.

Destructor

~this
~this()

Calls the destructor of the SumType's current value.

Postblit

this(this)
this(this)

@disabled if any member type is non-copyable.

Members

Aliases

Types
alias Types = FlattenSumTypes!(TypeArgs)

The types a SumType can hold.

Functions

opAssign
void opAssign(T rhs)

Assigns a value to a SumType.

opAssign
void opAssign(SumType rhs)

Copies the value from another SumType into this one.

opAssign
void opAssign(SumType rhs)
Undocumented in source.
opAssign
void opAssign(SumType rhs)

Moves the value from another SumType into this one.

opEquals
bool opEquals(SumType rhs)

Compares two SumTypes for equality.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
trustedGet
inout(T) trustedGet()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta