ResponseT

edomata.core.ResponseT
See theResponseT companion object
final case class ResponseT[+RES[_], +R, +N, +A](result: RES[A], notifications: Chain[N])

Representation of programs that decide and emit notifications

This adds capability of emiting notifications/integration events to effectful programs

Type parameters

A

output type

N

notification type

R

rejection type

RES

effect type

Attributes

Companion
object
Source
ResponseT.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

inline def >>[RES2[x], R2 >: R, N2 >: N, B](f: A => ResponseT[RES2, R2, N2, B])(using MonadError[RES2, Type[R2]], RaiseError[RES2, R2]): ResponseT[RES2, R2, N2, B]

Attributes

Source
ResponseT.scala
inline def as[RES2[x], B](b: B)(using Functor[RES2]): ResponseT[RES2, R, N, B]

Attributes

Source
ResponseT.scala
def flatMap[RES2[x], R2 >: R, N2 >: N, B](f: A => ResponseT[RES2, R2, N2, B])(using F: MonadError[RES2, Type[R2]], E: RaiseError[RES2, R2]): ResponseT[RES2, R2, N2, B]

Attributes

Source
ResponseT.scala
def handleErrorWith[RES2[x], R2 >: R, N2 >: N, A2 >: A](f: Type[R2] => ResponseT[RES2, R2, N2, A2])(using E: RaiseError[RES2, R2]): ResponseT[RES2, R2, N2, A2]

Attributes

Source
ResponseT.scala
def map[RES2[x], B](f: A => B)(using F: Functor[RES2]): ResponseT[RES2, R, N, B]

Attributes

Source
ResponseT.scala
def publish[N2 >: N](ns: N2*): ResponseT[RES, R, N2, A]

Adds notification without considering decision state

Adds notification without considering decision state

Attributes

Source
ResponseT.scala
def publishOnRejection[RES2[x], R2 >: R, N2 >: N](ns: N2*)(using E: RaiseError[RES2, R2]): ResponseT[RES2, R2, N2, A]

publishes these notifications if this program result is rejected

publishes these notifications if this program result is rejected

Attributes

Source
ResponseT.scala
def publishOnRejectionWith[RES2[x], R2 >: R, N2 >: N](f: Type[R2] => Seq[N2])(using E: RaiseError[RES2, R2]): ResponseT[RES2, R, N2, A]

If it is rejected, uses given function to decide what to publish

If it is rejected, uses given function to decide what to publish

Attributes

Source
ResponseT.scala
def reset: ResponseT[RES, R, N, A]

Clears all notifications so far

Clears all notifications so far

Attributes

Source
ResponseT.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product