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

Functions

dynamicCast
inout(Option!U) dynamicCast()

Given some type U, perform a dynamic cast on the class reference held within this optional value, and return a new optional value which may be null if the cast fails.

opAssign
void opAssign(U value)

Assign another value to this object.

or
Some!T or(DG dg)
immutable(Some!T) or(DG dg)
const(Some!T) or(DG dg)

Return some value from this reference, or a default value by calling a callable argument. (function pointer, delegate, etc.)

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