Option

Undocumented in source.

Constructors

this
this(U u)
Undocumented in source.

Members

Aliases

WrappedType
alias WrappedType = T
Undocumented in source.
WrapperType
alias WrapperType = VariantN!(T.sizeof, T)
Undocumented in source.

Functions

clear
void clear()

Clear the option so it no longer has a value.

isNone
bool isNone()

Whether this option does not have some value.

isSome
bool isSome()

Whether this option has some value.

opAssign
void opAssign(U u)
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()

Implicit conversion to bool. Equivalent to isSome().

unwrap
inout(WrappedType) unwrap(string msg)

Return the wrapped value. Throws an exception if there is no value.

Variables

value
WrapperType value;

The underlying value wrapped in a std.VariantN.

Meta