@implicitNotFound("\nCould not find `ToEffect` for effect ${F} and environment ${R}. `ToEffect` can be one of the following:\n\n1) Non-contextual: derived automatically when `cats.effect.Async` and `Runtime` are available in the implicit scope. A way to go for non-contextual effects (e.g. `cats.effect.IO`):\n\nimplicit val async: Async[${F}] = ???\nimplicit val runtime: Runtime[${R}] = ???\nimplicit val toEffect: ToEffect[${F}, ${R}] = implicitly // or an explicit call `ToEffect.forAsync`\n\n2) Contextual: injects ZIO environment into underlying effect. Can be used to share a context between ZIO and Kleisli-like effects:\n\ncase class Context(isAdmin: Boolean)\ntype Effect[A] = Kleisli[IO, Context, A]\n\nval dispatcher: Dispatcher[Effect] = ???\n\nimplicit val runtime: Runtime[Context] = ???\nimplicit val injectContext: InjectEnv[Effect, Context] = InjectEnv.kleisli\nimplicit val toEffect: ToEffect[Effect, Context] = ToEffect.contextual\n\n")
Describes how a polymorphic effect F
can be created from zio.RIO.
- Type parameters:
- F
the higher-kinded type of a polymorphic effect
- R
the type of ZIO environment
- Companion:
- object
class Object
trait Matchable
class Any