UnwrapOr(FuncT) |
Returns the underlying value when IsOk; or returns lazyFallbackValue() when IsErr.
This is a safe way to unwrap the result, by explicitly handling the Err variant.
Use the eager UnwrapOr(T) variant if the fallback value is cheap or readily available.
C#
|
UnwrapOr(T) |
Returns the underlying value when IsOk; or returns the fallbackValue when IsErr.
This is a safe way to unwrap the result, by explicitly handling the Err variant.
Use the lazy UnwrapOr(FuncT) variant if the computation of the fallback value is expensive.
C#
|