unwrapOr method

T unwrapOr(
  1. T orValue
)

Returns the held value of this Result if it is Ok, or the given value if this Result is Err.

See also: Rust: Result::unwrap_or()

Implementation

T unwrapOr(T orValue) => switch (this) {
	Ok(value: T value) => value,
	Err() => orValue
};