ZIO<R, E, A>.fromEither constructor

ZIO<R, E, A>.fromEither(
  1. Either<E, A> ea
)

Create a ZIO from the given Either, succeeding when it is a Right, and failing when it is a Left.

Implementation

factory ZIO.fromEither(Either<E, A> ea) => ZIO.fromExit(ea.toExit());