Packages

package zio

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. zio
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class ZioEffect[R, E] extends Effect[[γ$0$]ZIO[R, E, γ$0$]]

Value Members

  1. 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.

  2. 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]

Inherited from AnyRef

Inherited from Any

Ungrouped