mapOrElse<U> method
U
mapOrElse<U>(
- U ok(
- T
- U err(
- E
Maps a Result<T, E> to U
by applying ok
to a contained value or
err
to a contained error.
Implementation
U mapOrElse<U>(U Function(T) ok, U Function(E) err) =>
isOk ? ok(_value) : err(_error);