Optional.of

Constructs an optional value using a Phobos nullable.

  1. Optional!T of(T value)
  2. Optional!T of(Nullable!T nullableValue)
    struct Optional(T)
    static
    of
    (
    Nullable!T nullableValue
    )

Parameters

nullableValue Nullable!T

The nullable value to use.

Return Value

Type: Optional!T

An optional that contains the given nullable value.