sealed trait Handler[-R, +Err, -In, +Out] extends AnyRef

Self Type
Handler[R, Err, In, Out]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Handler
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def apply(in: In): ZIO[R, Err, Out]

    Consumes the input and executes the Handler.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def *>[R1 <: R, Err1 >: Err, In1 <: In, Out1](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Alias for zipRight

  4. final def <*[R1 <: R, Err1 >: Err, In1 <: In, Out1](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out]

    Alias for zipLeft

  5. final def <*>[R1 <: R, Err1 >: Err, In1 <: In, Out1](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, (Out, Out1)]
  6. final def <<<[R1 <: R, Err1 >: Err, In1, Out1 <: In](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out]

    Composes one handler with another.

  7. final def <>[R1 <: R, Err1, In1 <: In, Out1 >: Out](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Runs self but if it fails, runs other, ignoring the result from self.

  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def >>=[R1 <: R, Err1 >: Err, In1 <: In, Out1](f: (Out) => Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Alias for flatmap

  10. final def >>>[R1 <: R, Err1 >: Err, In1 >: Out, Out1](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In, Out1]

    Pipes the output of one handler into the other

  11. def @@[Env1 <: R, Ctx, In1 <: In](aspect: HandlerAspect[Env1, Ctx])(implicit zippable: Out[Ctx, Request, In1], res: <:<[Out, Response], trace: Trace): Handler[Env1, Response, Request, Response]
  12. def @@[Env1 <: R, In1 <: In](aspect: HandlerAspect[Env1, Unit])(implicit in: IsRequest[In1], out: <:<[Out, Response], err: <:<[Err, Response]): Handler[Env1, Response, Request, Response]
  13. final def absolve[Err1 >: Err, Out1](implicit ev: <:<[Out, Either[Err1, Out1]], trace: Trace): Handler[R, Err1, In, Out1]

    Returns a handler that submerges the error case of an Either into the Handler.

    Returns a handler that submerges the error case of an Either into the Handler. The inverse operation of Handler.either.

  14. final def andThen[R1 <: R, Err1 >: Err, In1 >: Out, Out1](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In, Out1]

    Named alias for >>>

  15. final def as[Out1](out: Out1)(implicit trace: Trace): Handler[R, Err, In, Out1]

    Makes the handler resolve with a constant value

  16. final def asEnvType[R2](implicit ev: <:<[R2, R]): Handler[R2, Err, In, Out]
  17. final def asErrorType[Err2](implicit ev: <:<[Err, Err2]): Handler[R, Err2, In, Out]
  18. final def asInType[In2](implicit ev: <:<[In2, In]): Handler[R, Err, In2, Out]
  19. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  20. final def asOutType[Out2](implicit ev: <:<[Out, Out2]): Handler[R, Err, In, Out2]
  21. final def body(implicit ev: <:<[Out, Response], trace: Trace): Handler[R, Err, In, Body]
  22. final def catchAll[R1 <: R, Err1, In1 <: In, Out1 >: Out](f: (Err) => Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Catches all the exceptions that the handler can fail with

  23. final def catchAllCause[R1 <: R, Err1, In1 <: In, Out1 >: Out](f: (Cause[Err]) => Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]
  24. final def catchAllDefect[R1 <: R, Err1 >: Err, In1 <: In, Out1 >: Out](f: (Throwable) => Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Recovers from all defects with provided function.

    Recovers from all defects with provided function.

    WARNING: There is no sensible way to recover from defects. This method should be used only at the boundary between Handler and an external system, to transmit information on a defect for diagnostic or explanatory purposes.

  25. final def catchSome[R1 <: R, Err1 >: Err, In1 <: In, Out1 >: Out](pf: PartialFunction[Err, Handler[R1, Err1, In1, Out1]])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Recovers from some or all of the error cases.

  26. final def catchSomeDefect[R1 <: R, Err1 >: Err, In1 <: In, Out1 >: Out](pf: PartialFunction[Throwable, Handler[R1, Err1, In1, Out1]])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Recovers from some or all of the defects with provided partial function.

    Recovers from some or all of the defects with provided partial function.

    WARNING: There is no sensible way to recover from defects. This method should be used only at the boundary between Handler and an external system, to transmit information on a defect for diagnostic or explanatory purposes.

  27. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  28. final def compose[R1 <: R, Err1 >: Err, In1, Out1 <: In](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out]

    Named alias for <<<

  29. final def contraFlatMap[In1]: ContraFlatMap[R, Err, In, Out, In1]

    Transforms the input of the handler before passing it on to the current Handler

  30. final def contramap[In1](f: (In1) => In): Handler[R, Err, In1, Out]

    Transforms the input of the handler before passing it on to the current Handler

  31. final def contramapZIO[R1 <: R, Err1 >: Err, In1](f: (In1) => ZIO[R1, Err1, In])(implicit trace: Trace): Handler[R1, Err1, In1, Out]

    Transforms the input of the handler before giving it effectfully

  32. final def delay(duration: zio.Duration)(implicit trace: Trace): Handler[R, Err, In, Out]

    Delays production of output B for the specified duration of time

  33. final def delayAfter(duration: zio.Duration)(implicit trace: Trace): Handler[R, Err, In, Out]

    Delays production of output B for the specified duration of time

  34. final def delayBefore(duration: zio.Duration)(implicit trace: Trace): Handler[R, Err, In, Out]

    Delays consumption of input A for the specified duration of time

  35. final def either(implicit ev: CanFail[Err], trace: Trace): Handler[R, Nothing, In, Either[Err, Out]]

    Returns a handler whose failure and success have been lifted into an Either.

    Returns a handler whose failure and success have been lifted into an Either. The resulting handler cannot fail, because the failure case has been exposed as part of the Either success case.

  36. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  38. final def flatMap[R1 <: R, Err1 >: Err, In1 <: In, Out1](f: (Out) => Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Creates a new handler from another

  39. final def flatten[R1 <: R, Err1 >: Err, In1 <: In, Out1](implicit ev: <:<[Out, Handler[R1, Err1, In1, Out1]], trace: Trace): Handler[R1, Err1, In1, Out1]

    Flattens a handler of a handler

  40. final def foldCauseHandler[R1 <: R, Err1, In1 <: In, Out1](onFailure: (Cause[Err]) => Handler[R1, Err1, In1, Out1], onSuccess: (Out) => Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]
  41. final def foldHandler[R1 <: R, Err1, In1 <: In, Out1](onFailure: (Err) => Handler[R1, Err1, In1, Out1], onSuccess: (Out) => Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Folds over the handler by taking in two functions one for success and one for failure respectively.

  42. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  43. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  44. final def header(headerType: HeaderType)(implicit ev: <:<[Out, Response], trace: Trace): Handler[R, Err, In, Option[HeaderValue]]
  45. final def headers(implicit ev: <:<[Out, Response], trace: Trace): Handler[R, Err, In, Headers]
  46. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  47. final def map[Out1](f: (Out) => Out1)(implicit trace: Trace): Handler[R, Err, In, Out1]

    Transforms the output of the handler

  48. final def mapError[Err1](f: (Err) => Err1)(implicit trace: Trace): Handler[R, Err1, In, Out]

    Transforms the failure of the handler

  49. final def mapErrorCause[Err2](f: (Cause[Err]) => Err2)(implicit trace: Trace): Handler[R, Err2, In, Out]

    Transforms all failures except pure interruption.

  50. final def mapErrorCauseZIO[R1 <: R, Err1, Out1 >: Out](f: (Cause[Err]) => ZIO[R1, Err1, Out1])(implicit trace: Trace): Handler[R1, Err1, In, Out1]

    Transforms all failures of the handler effectfully except pure interruption.

  51. final def mapErrorZIO[R1 <: R, Err1, Out1 >: Out](f: (Err) => ZIO[R1, Err1, Out1])(implicit trace: Trace): Handler[R1, Err1, In, Out1]

    Transforms the failure of the handler effectfully

  52. final def mapZIO[R1 <: R, Err1 >: Err, Out1](f: (Out) => ZIO[R1, Err1, Out1])(implicit trace: Trace): Handler[R1, Err1, In, Out1]

    Transforms the output of the handler effectfully

  53. final def merge[Err1 >: Err, Out1 >: Out](implicit ev: =:=[Err1, Out1], trace: Trace): Handler[R, Nothing, In, Out1]

    Returns a new handler where the error channel has been merged into the success channel to their common combined type.

  54. final def narrow[In1](implicit ev: <:<[In1, In]): Handler[R, Err, In1, Out]

    Narrows the type of the input

  55. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  56. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  57. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  58. final def onExit[R1 <: R, Err1 >: Err](f: (Exit[Err, Out]) => ZIO[R1, Err1, Any])(implicit trace: Trace): Handler[R1, Err1, In, Out]
  59. final def option(implicit ev: CanFail[Err], trace: Trace): Handler[R, Nothing, In, Option[Out]]

    Executes this handler, skipping the error but returning optionally the success.

  60. final def optional[Err1](implicit ev: <:<[Err, Option[Err1]], trace: Trace): Handler[R, Err1, In, Option[Out]]

    Converts an option on errors into an option on values.

  61. final def orDie(implicit ev1: <:<[Err, Throwable], ev2: CanFail[Err], trace: Trace): Handler[R, Nothing, In, Out]

    Translates handler failure into death of the handler, making all failures unchecked and not a part of the type of the handler.

  62. final def orDieWith(f: (Err) => Throwable)(implicit ev: CanFail[Err], trace: Trace): Handler[R, Nothing, In, Out]

    Keeps none of the errors, and terminates the handler with them, using the specified function to convert the E into a Throwable.

  63. final def orElse[R1 <: R, Err1, In1 <: In, Out1 >: Out](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Named alias for <>

  64. final def provideEnvironment(r: ZEnvironment[R])(implicit trace: Trace): Handler[Any, Err, In, Out]

    Provides the environment to Handler.

  65. final def provideLayer[Err1 >: Err, R0](layer: ZLayer[R0, Err1, R])(implicit trace: Trace): Handler[R0, Err1, In, Out]

    Provides layer to Handler.

  66. final def provideSomeEnvironment[R1](f: (ZEnvironment[R1]) => ZEnvironment[R])(implicit trace: Trace): Handler[R1, Err, In, Out]

    Provides some of the environment to Handler.

  67. final def provideSomeLayer[R0, R1, Err1 >: Err](layer: ZLayer[R0, Err1, R1])(implicit arg0: Tag[R1], ev: <:<[R0 with R1, R], trace: Trace): Handler[R0, Err1, In, Out]

    Provides some of the environment to Handler leaving the remainder R0.

  68. final def race[R1 <: R, Err1 >: Err, In1 <: In, Out1 >: Out](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Performs a race between two handlers

  69. final def refineOrDie[Err1](pf: PartialFunction[Err, Err1])(implicit ev1: <:<[Err, Throwable], ev2: CanFail[Err], trace: Trace): Handler[R, Err1, In, Out]

    Keeps some of the errors, and terminates the handler with the rest.

  70. final def refineOrDieWith[Err1](pf: PartialFunction[Err, Err1])(f: (Err) => Throwable)(implicit ev: CanFail[Err], trace: Trace): Handler[R, Err1, In, Out]

    Keeps some of the errors, and terminates the handler with the rest, using the specified function to convert the E into a Throwable.

  71. final def run(method: Method = Method.GET, path: Path = Path.root, headers: Headers = Headers.empty, body: Body = Body.empty)(implicit ev: <:<[Request, In]): ZIO[R, Err, Out]
  72. final def runZIO(in: In): ZIO[R, Err, Out]
  73. final def sandbox(implicit trace: Trace): Handler[R, Response, In, Out]
  74. final def status(implicit ev: <:<[Out, Response], trace: Trace): Handler[R, Err, In, Status]
  75. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  76. final def tapAllZIO[R1 <: R, Err1 >: Err](onFailure: (Cause[Err]) => ZIO[R1, Err1, Any], onSuccess: (Out) => ZIO[R1, Err1, Any])(implicit trace: Trace): Handler[R1, Err1, In, Out]

    Returns a Handler that effectfully peeks at the success, failed or defective value of this Handler.

  77. final def tapErrorCauseZIO[R1 <: R, Err1 >: Err](f: (Cause[Err]) => ZIO[R1, Err1, Any])(implicit trace: Trace): Handler[R1, Err1, In, Out]
  78. final def tapErrorZIO[R1 <: R, Err1 >: Err](f: (Err) => ZIO[R1, Err1, Any])(implicit trace: Trace): Handler[R1, Err1, In, Out]

    Returns a Handler that effectfully peeks at the failure of this Handler.

  79. final def tapZIO[R1 <: R, Err1 >: Err](f: (Out) => ZIO[R1, Err1, Any])(implicit trace: Trace): Handler[R1, Err1, In, Out]

    Returns a Handler that effectfully peeks at the success of this Handler.

  80. def timeout(duration: zio.Duration)(implicit trace: Trace): Handler[R, Err, In, Option[Out]]
  81. def timeoutFail[Out1 >: Out](out: Out1)(duration: zio.Duration)(implicit trace: Trace): Handler[R, Err, In, Out1]
  82. def toHttpApp(implicit err: <:<[Err, Response], in: <:<[Request, In], out: <:<[Out, Response], trace: Trace): HttpApp[R]

    Converts the request handler into an HTTP application.

    Converts the request handler into an HTTP application. Note that the handler of the HTTP application is not identical to this handler, because the handler has been appropriately sandboxed, turning all possible failures into well-formed HTTP responses.

  83. def toString(): String
    Definition Classes
    AnyRef → Any
  84. final def unrefine[Err1 >: Err](pf: PartialFunction[Throwable, Err1])(implicit trace: Trace): Handler[R, Err1, In, Out]

    Takes some defects and converts them into failures.

  85. final def unrefineTo[Err1 >: Err](implicit arg0: ClassTag[Err1], trace: Trace): Handler[R, Err1, In, Out]

    Takes some defects and converts them into failures.

  86. final def unrefineWith[Err1](pf: PartialFunction[Throwable, Err1])(f: (Err) => Err1)(implicit trace: Trace): Handler[R, Err1, In, Out]

    Takes some defects and converts them into failures, using the specified function to convert the E into an E1.

  87. final def unwrapZIO[R1 <: R, Err1 >: Err, Out1](implicit ev: <:<[Out, ZIO[R1, Err1, Out1]], trace: Trace): Handler[R1, Err1, In, Out1]

    Unwraps a Handler that returns a ZIO of Http

  88. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  89. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  90. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  91. def widen[Err1, Out1](implicit ev1: <:<[Err, Err1], ev2: <:<[Out, Out1]): Handler[R, Err1, In, Out1]

    Widens the type of the output

  92. final def zip[R1 <: R, Err1 >: Err, In1 <: In, Out1](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, (Out, Out1)]
  93. final def zipLeft[R1 <: R, Err1 >: Err, In1 <: In, Out1](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out]
  94. final def zipRight[R1 <: R, Err1 >: Err, In1 <: In, Out1](that: Handler[R1, Err1, In1, Out1])(implicit trace: Trace): Handler[R1, Err1, In1, Out1]

    Combines the two apps and returns the result of the one on the right

Deprecated Value Members

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

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped