package zio
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- zio
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def taskEffectInstance[R](runtime: Runtime[R]): Effect[Task]
Provides Effect instance for ZIO[Any, Throwable, *].
Provides Effect instance for ZIO[Any, Throwable, *]. Use this method if your app uses Throwable to express errors.
- final def zioEffectInstance[R, E](runtime: Runtime[R])(liftError: (Throwable) => E)(unliftError: (E) => Throwable): Effect[[γ$0$]ZIO[R, E, γ$0$]]
Provides Effect instance for ZIO with arbitrary runtime and error types.
Provides Effect instance for ZIO with arbitrary runtime and error types. Korolev uses Throwable inside itself. That means if you want to work with your own E, you should provide functions to convert Throwable to E and vice versa.
sealed trait MyError object MyError { case class UserNotFound(id: Long) extends MyError case object DoNotLikeIt extends MyError case class Unexpected(e: Throwable) extends MyError } case class MyErrorException(error: MyError) extends Throwable val runtime = new DefaultRuntime {} implicit val zioEffect = korolev.zio.zioEffectInstance(runtime)(MyError.Unexpected)(MyErrorException) val ctx = Context[IO[MyError, *], MyState, Any]