optional.or

Gets the value or else something else

Members

Classes

FrontOrThrowException
class FrontOrThrowException

An exception that's throw by frontOrThrow should the exception maker throw

Functions

frontOr
auto frontOr(T value)
auto frontOr(T value, U elseValue)

If value is valid, it returns the internal value. This means .front for a range, .get for a Nullable!T, etc. If value is invalid, then elseValue is returned. If an elsePred is provided than that is called.

frontOrThrow
auto frontOrThrow(T value)
auto frontOrThrow(T value, U throwable)

Same as frontOr except it throws an error if it can't get the value

or
auto or(T value)
auto or(T value, U elseValue)

If value is valid, it returns the value. If value is invalid, then elseValue is returned. If an elsePred is provided than that is called.

Meta