Option

This type represents an optional value for T.

This is a means of explicitly dealing with null values in every case.

Constructors

this
this(inout(U) value)

Construct this object by wrapping a given value.

Members

Aliases

opApplyReverse
alias opApplyReverse = opApply

Reverse iteration is exactly the same as forward iteration.

Functions

opApply
int opApply(int delegate(const(Some!T)) dg)

Permit foreach over an option type.

opApply
int opApply(int delegate(Some!T) dg)
int opApply(int delegate(immutable(Some!T)) dg)

Permit foreach over an option type.

opAssign
void opAssign(U value)

Assign another value to this object.

Properties

get
Some!T get [@property getter]
const(Some!T) get [@property getter]
immutable(Some!T) get [@property getter]

Get the value from this object.

isNull
bool isNull [@property getter]

Meta