Nullable.get

Gets the value if not null. If this is in the null state, and the optional parameter fallback was provided, it will be returned. Without fallback, calling get with a null state is invalid.

When the fallback type is different from the Nullable type, get(T) returns the common type.

  1. inout(T) get [@property getter]
  2. inout(T) get [@property setter]
    struct Nullable(T)
    @property inout @safe pure nothrow
    inout(T)
    get
    ()
    (
    inout(T) fallback
    )
  3. inout(U) get [@property setter]

Parameters

fallback inout(T)

the value to return in case the Nullable is null.

Return Value

Type: inout(T)

The value held internally by this Nullable.

Meta