unwrapOr method

T unwrapOr(
  1. T orValue
)

Returns the held value of this Option if it is Some, or the given value if this Option is None.

See also: Rust: Option::unwrap_or()

Implementation

T unwrapOr(T orValue) => switch (this) {
	Some(value: T value) => value,
	None() => orValue
};