MakeFromZIOZEnv

izumi.distage.model.definition.dsl.ModuleDefDSL.MakeDSLBase.MakeFromZIOZEnv
final implicit class MakeFromZIOZEnv[T, AfterBind](val dsl: MakeDSLBase[T, AfterBind]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def fromZEnvResource[R1 <: Lifecycle[[_] =>> ZIO[Nothing, Any, _$21], T] : ClassConstructor](implicit evidence$1: ClassConstructor[R1], tag: ZIOEnvLifecycleTag[R1, T]): AfterBind

Bind to a Lifecycle class which has a ZIO effect type that specifies dependencies via zio environment, e.g.

Bind to a Lifecycle class which has a ZIO effect type that specifies dependencies via zio environment, e.g.

class IntLifecycle extends Lifecycle.OfZIO[Double, Nothing, Int](
 for {
   double <- ZIO.service[Double]
   _ <- ZIO.acquireRelease(ZIO.unit)(_ => ZIO.succeed(println("Closed")))
 } yield double.toInt
)

val module = new ModuleDef {
 make[Int].fromZEnvLifecycle[IntLifecycle]
 make[Double].from(5.0)
}

Injector[Task]().produceRun(module) {
 (i: Int) => ZIO.succeed(println(i))
}
// 5
// Closed

Warning: removes the precise subtype of Lifecycle because of Lifecycle.map: Integration checks mixed-in as a trait onto a Lifecycle value result here will be lost

Attributes

def fromZEnvResource[R : ZEnvConstructor, E >: DottyNothing : Tag, I <: T : Tag](resource: Lifecycle[[_] =>> ZIO[R, E, _$22], I]): AfterBind

Bind to a Lifecycle value which has a ZIO effect type that specifies dependencies via zio environment

Bind to a Lifecycle value which has a ZIO effect type that specifies dependencies via zio environment

Warning: removes the precise subtype of Lifecycle because of Lifecycle.map: Integration checks mixed-in as a trait onto a Lifecycle value result here will be lost

Attributes

def fromZEnvResource[R : ZEnvConstructor, E >: DottyNothing : Tag, I <: T : Tag](function: Functoid[Lifecycle[[_] =>> ZIO[R, E, _$25], I]]): AfterBind

Bind to a Lifecycle value which has a ZIO effect type that specifies dependencies via zio environment

Bind to a Lifecycle value which has a ZIO effect type that specifies dependencies via zio environment

Warning: removes the precise subtype of Lifecycle because of Lifecycle.map: Integration checks mixed-in as a trait onto a Lifecycle value result here will be lost

Attributes

def fromZIOEnv[R : ZEnvConstructor, E >: DottyNothing : Tag, I <: T : Tag](effect: ZIO[Scope & R, E, I]): AfterBind
def fromZIOEnv[R : ZEnvConstructor, E >: DottyNothing : Tag, I <: T : Tag](function: Functoid[ZIO[Scope & R, E, I]]): AfterBind
def fromZLayerEnv[R : ZEnvConstructor, E >: DottyNothing : Tag, I <: T : Tag](layer: ZLayer[R, E, I]): AfterBind
def fromZLayerEnv[R : ZEnvConstructor, E >: DottyNothing : Tag, I <: T : Tag](function: Functoid[ZLayer[R, E, I]]): AfterBind
def fromZManagedEnv[R : ZEnvConstructor, E >: DottyNothing : Tag, I <: T : Tag](resource: ZManaged[R, E, I]): AfterBind
def fromZManagedEnv[R : ZEnvConstructor, E >: DottyNothing : Tag, I <: T : Tag](function: Functoid[ZManaged[R, E, I]]): AfterBind