ToEitherFutureExtension<R> extension
Provide toEitherFuture extension on Future.
- on
-
- Future<
R>
- Future<
Methods
-
toEitherFuture<
L> (ErrorMapper< L> errorMapper) → Future<Either< L, R> > -
Transform data value to Right or error value to Left.
If this Future completes with a value, returns a Right containing that value.
Otherwise, calling
errorMapper
with the error value and wrap the result in a Left.