Optional.orElse

Get the payload if exists or provide an alternative.

struct Optional(T)
ref inout pure nothrow @nogc @safe
inout(T)
orElse
(
return ref scope inout(T) alternative
)

Parameters

alternative inout(T)

alternative to supply

Return Value

Type: inout(T)

Always a payload to use.

Meta