map Or Else
inline fun <V, E, U> Result<V, E>.mapOrElse(default: (E) -> U, transform: (V) -> U): U
Content copied to clipboard
Maps this Result to U by applying either the transform function if this Result is Ok, or the default function if this Result is an Err. Both of these functions must return the same type (U).
Rust: Result.map_or_else