object Context

Companion object for Context

Annotations
@deprecated
Deprecated

(Since version 0.10.3) Migrate to With* typeclasses

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

Type Members

  1. type Aux[F[_], C] = Context[F] { type Ctx = C }
  2. trait Companion[C] extends WithContext.Companion[C]

    A mix-in for supplying environment data type companions with useful things

    A mix-in for supplying environment data type companions with useful things

    Example:
    1. @ClassyOptics
        case class MyContext(id: Int, date: String)
      
      object MyContext extends Context.Companion[MyContext]

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. def apply[F[_]](implicit ctx: Context[F]): kernel.types.HasContext[F, Ctx]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  7. def const[F[_], C](c: C)(implicit arg0: Applicative[F]): WithContext[F, C]

    Creates constant Context of type C into F

    Creates constant Context of type C into F

    Allows to put some value into context of F even when F itself does not have any way to store it

    Example:
    1.  case class MyCtx(id: Int)
      
      val program: Option[String] = { implicit val ctx = Context.const[Option, MyCtx](MyCtx(3))
      
      Context[Option].ask(ctx => ctx.id.toString) }
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def make[F[_], A](fa: F[A])(implicit arg0: Functor[F]): WithContext[F, A]

    Same as const but context is effectual here

    Same as const but context is effectual here

    Example:
    1.  def handleRequest[F[_]: Monad: *[_] WithContext TraceId](httpRequest: Request) = ???
      
      def myProgram[F[_]: Monad] = for { request <- getRequest[F] implicit0(ctx: TraceId In F) <-
      Context.make(genTraceId[F]) _ <- handleRequest[F](request) } yield ()
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped