Attributes
Members list
Type members
Classlikes
A sub-trait of izumi.distage.model.definition.Lifecycle suitable for less-complex resource definitions via inheritance that do not require overriding izumi.distage.model.definition.Lifecycle#InnerResource.
A sub-trait of izumi.distage.model.definition.Lifecycle suitable for less-complex resource definitions via inheritance that do not require overriding izumi.distage.model.definition.Lifecycle#InnerResource.
final class BufferedReaderResource(
file: File
) extends Lifecycle.Basic[IO, BufferedReader] {
def acquire: IO[BufferedReader] = IO { new BufferedReader(new FileReader(file)) }
def release(reader: BufferedReader): IO[BufferedReader] = IO { reader.close() }
}
Attributes
Class-based variant of fromAutoCloseable:
Class-based variant of fromAutoCloseable:
class FileOutputRes extends Lifecycle.FromAutoCloseable(
acquire = IO(new FileOutputStream("abc"))
)
For binding resources using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Supertypes
Attributes
- Supertypes
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
Class-based variant of liftF:
Class-based variant of liftF:
class IntRes extends Lifecycle.LiftF(acquire = IO(1000))
For binding resources using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Note
-
acquireis performed interruptibly, unlike in Make - Supertypes
Class-based variant of make:
Class-based variant of make:
class IntRes extends Lifecycle.Make(
acquire = IO(1000)
)(release = _ => IO.unit)
For binding resources using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Supertypes
- Known subtypes
-
Class-based variant of makePair:
Class-based variant of makePair:
class IntRes extends Lifecycle.MakePair(IO(1000 -> IO.unit))
For binding resources using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Supertypes
Class-based variant of make_:
Class-based variant of make_:
class IntRes extends Lifecycle.Make_(IO(1000))(IO.unit)
For binding resources using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Supertypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass AnyShow all
- Self type
-
A
Attributes
- Supertypes
-
class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
- Known subtypes
Class-based proxy over a Lifecycle value
Class-based proxy over a Lifecycle value
class IntRes extends Lifecycle.Of(Lifecycle.pure(1000))
For binding resource values using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Note
-
when the expression passed to Lifecycle.Of defines many local methods it can hit a Scalac bug https://github.com/scala/bug/issues/11969 and fail to compile, in that case you may switch to Lifecycle.OfInner
- Supertypes
- Known subtypes
-
Class-based proxy over a cats.effect.Resource value
Class-based proxy over a cats.effect.Resource value
class IntRes extends Lifecycle.OfCats(Resource.pure(1000))
For binding resource values using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Supertypes
Trait-based proxy over a Lifecycle value
Trait-based proxy over a Lifecycle value
class IntRes extends Lifecycle.OfInner[IO, Int] {
override val lifecycle: Lifecycle[IO, Int] = Lifecycle.pure(1000)
}
For binding resource values using class syntax in distage.ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Note
-
This class may be used instead of Lifecycle.Of to workaround scalac bug https://github.com/scala/bug/issues/11969 when defining local methods
- Supertypes
- Known subtypes
-
Show all
Class-based proxy over a scoped zio.ZIO value
Class-based proxy over a scoped zio.ZIO value
class IntRes extends Lifecycle.OfZIO(ZIO.acquireRelease(ZIO.succeed(1000))(_ => ZIO.unit))
For binding resource values using class syntax in ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Supertypes
Class-based proxy over a zio.ZLayer value
Class-based proxy over a zio.ZLayer value
class IntRes extends Lifecycle.OfZLayer(ZLayer.succeed(1000))
For binding resource values using class syntax in ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Supertypes
Class-based proxy over a zio.managed.ZManaged value
Class-based proxy over a zio.managed.ZManaged value
class IntRes extends Lifecycle.OfZManaged(ZManaged.succeed(1000))
For binding resource values using class syntax in ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Supertypes
Attributes
- Supertypes
- Known subtypes
-
trait MutableNoClose[A]
- Self type
-
A
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Value members
Concrete methods
Fork the specified action into a new fiber. When this Lifecycle is released, the fiber will be interrupted using izumi.functional.bio.Fiber2#interrupt
Fork the specified action into a new fiber. When this Lifecycle is released, the fiber will be interrupted using izumi.functional.bio.Fiber2#interrupt
Attributes
- Returns
-
The fiber running
faction
Fork the specified action into a new fiber. When this Lifecycle is released, the fiber will be interrupted using cats.effect.Fiber#cancel
Fork the specified action into a new fiber. When this Lifecycle is released, the fiber will be interrupted using cats.effect.Fiber#cancel
Attributes
- Returns
-
The fiber running
faction
Attributes
- See also
For stateful objects that have a separate post-creation init method.
For stateful objects that have a separate post-creation init method.
Attributes
Implicits
Implicits
Inherited implicits
Attributes
- Inherited from:
- LifecycleCatsInstancesLowPriority (hidden)
Attributes
- Inherited from:
- LifecycleCatsInstances (hidden)
Attributes
- Inherited from:
- LifecycleCatsInstances (hidden)
Attributes
- Inherited from:
- LifecycleInstances (hidden)