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
- Graph
- Supertypes
- Known subtypes
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 ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Graph
- Supertypes
Attributes
- Graph
- Supertypes
Attributes
- Graph
- Supertypes
Class-based variant of liftF:
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- A
Attributes
- Graph
- Supertypes
Attributes
- Graph
- 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 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
- Graph
- 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 ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Graph
- 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 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
- Graph
- Supertypes
- Known subtypes
Class-based proxy over a zio.ZManaged value
Class-based proxy over a zio.ZManaged value
class IntRes extends Lifecycle.OfZIO(Managed.succeed(1000))
For binding resource values using class syntax in ModuleDef:
val module = new ModuleDef {
make[Int].fromResource[IntRes]
}
Attributes
- Graph
- Supertypes
Attributes
- Graph
- Supertypes
- Known subtypes
- trait MutableNoClose[A]
- Self type
- A
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class AnyValtrait Matchableclass Any
Attributes
- Graph
- 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
f
action
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
f
action
Attributes
- See also:
Attributes
- effect
is performed interruptibly, unlike in make
Attributes
- effect
is performed interruptibly, unlike in make
Implicits
Implicits
Inherited implicits
Attributes
- Inherited from:
- LifecycleCatsInstancesLowPriority (hidden)
Attributes
- Inherited from:
- LifecycleCatsInstances (hidden)
Attributes
- Inherited from:
- LifecycleCatsInstances (hidden)
Attributes
- Inherited from:
- LifecycleInstances (hidden)
Attributes
- Inherited from:
- LifecycleInstances (hidden)