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]
  3. inout(U) get [@property setter]
    struct Nullable(T)
    @property inout @safe pure nothrow
    get
    (
    U
    )
    (
    inout(U) fallback
    )

Parameters

fallback inout(U)

the value to return in case the Nullable is null.

Return Value

Type: auto

The value held internally by this Nullable.

Meta