unwrapOr method
T
unwrapOr(
- 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
};