object DIResource

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

Type Members

  1. trait Cats[F[_], A] extends DIResourceBase[F, A]
  2. trait DIResourceBase[+F[_], +OuterResource] extends AnyRef
  3. implicit final class DIResourceCatsSyntax[F[_], A] extends AnyVal
  4. implicit final class DIResourceUse[F[_], A] extends AnyVal
  5. class LiftF[+F[_], A] extends NoClose[F, A]
  6. class Make[+F[_], A] extends DIResource[F, A]
  7. class Make_[+F[_], A] extends Make[F, A]
  8. trait Mutable[+A] extends Self[Identity, A]
  9. trait MutableNoClose[+A] extends SelfNoClose[Identity, A]
  10. abstract class NoClose[+F[_], A] extends DIResource.DIResourceBase.NoClose[F, A] with DIResource[F, A]
  11. trait ResourceTag[R] extends AnyRef
  12. trait ResourceTagLowPriority extends AnyRef
  13. trait Self[+F[_], +A] extends DIResourceBase[F, A]
  14. abstract class SelfNoClose[+F[_], +A] extends DIResource.DIResourceBase.NoClose[F, A]
  15. trait Simple[A] extends DIResource[Identity, A]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def fromAutoCloseable[A <: AutoCloseable](acquire: ⇒ A): DIResource[Identity, A]
  9. def fromAutoCloseableF[F[_], A <: AutoCloseable](acquire: ⇒ F[A])(implicit F: DIEffect[F]): DIResource[F, A]
  10. def fromCats[F[_], A](resource: Resource[F, A])(implicit arg0: Bracket[F, Throwable]): Cats[F, A]

    Convert cats.effect.Resource into a DIResource

  11. def fromExecutorService[A <: ExecutorService](acquire: ⇒ A): DIResource[Identity, A]
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def liftF[F[_], A](acquire: ⇒ F[A])(implicit F: DIEffect[F]): DIResource[F, A]
  16. def make[F[_], A](acquire: ⇒ F[A])(release: (A) ⇒ F[Unit]): DIResource[F, A]
  17. def makeSimple[A](acquire: ⇒ A)(release: (A) ⇒ Unit): DIResource[Identity, A]
  18. def make_[F[_], A](acquire: ⇒ F[A])(release: ⇒ F[Unit]): DIResource[F, A]
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. implicit final def providerFromCats[F[_], A](resource: Resource[F, A])(implicit arg0: reflection.universe.RuntimeDIUniverse.TagK[F], arg1: reflection.universe.RuntimeDIUniverse.Tag[A]): ProviderMagnet[Cats[F, A]]

    Allows you to bind cats.effect.Resource-based constructors in ModuleDef:

    Allows you to bind cats.effect.Resource-based constructors in ModuleDef:

    Example:

    import cats.effect._
    
    val catsResource = Resource.liftF(IO(5))
    
    val module = new distage.ModuleDef {
    
      make[Int].fromResource(catsResource)
    
      addImplicit[Bracket[IO, Throwable]]
    }

    NOTE: binding a cats Resource[F, A] will add a dependency on Bracket[F, Throwable] for your corresponding F type

  23. implicit final def providerFromCatsProvider[F[_], A](resourceProvider: ProviderMagnet[Resource[F, A]])(implicit arg0: reflection.universe.RuntimeDIUniverse.TagK[F], arg1: reflection.universe.RuntimeDIUniverse.Tag[A]): ProviderMagnet[Cats[F, A]]

    Allows you to bind cats.effect.Resource-based constructor functions in ModuleDef:

    Allows you to bind cats.effect.Resource-based constructor functions in ModuleDef:

    Example:

    import cats.effect._
    import doobie.hikari._
    
    final case class JdbcConfig(driverClassName: String, url: String, user: String, pass: String)
    
    val module = new distage.ModuleDef {
    
      make[ExecutionContext].from(scala.concurrent.ExecutionContext.global)
    
      make[JdbcConfig].from {
        conf: JdbcConfig @ConfPath("jdbc") => conf
      }
    
      make[HikariTransactor[IO]].fromResource {
        (ec: ExecutionContext, jdbc: JdbcConfig) =>
          implicit val C: ContextShift[IO] = IO.contextShift(ec)
    
          HikariTransactor.newHikariTransactor[IO](jdbc.driverClassName, jdbc.url, jdbc.user, jdbc.pass, ec, ec)
      }
    
      addImplicit[Bracket[IO, Throwable]]
    }

    NOTE: binding a cats Resource[F, A] will add a dependency on Bracket[F, Throwable] for your corresponding F type

  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. object DIResourceBase
  30. object ResourceTag extends ResourceTagLowPriority

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped