ReactionADT

io.github.positionpal.reaction.ReactionADT
object ReactionADT

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

trait ComposableReaction[E, S, R] extends ReactionADT[E, S, R]

A set of operations that compose the execution of two or more Reaction together

A set of operations that compose the execution of two or more Reaction together

Attributes

Supertypes
trait ReactionADT[E, S, R]
class Object
trait Matchable
class Any
Known subtypes
trait OptionReaction[E, S, T]
case class Context[E, S](event: E, state: S)

The context of a Reaction

The context of a Reaction

Value parameters

event

The occurred event

state

The current state of the entity that reacts to the event.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait FilterableReaction[E, S, R] extends ReactionADT[E, S, R]

A set of operations that filter the Reaction execution

A set of operations that filter the Reaction execution

Attributes

Supertypes
trait ReactionADT[E, S, R]
class Object
trait Matchable
class Any
Known subtypes
trait OptionReaction[E, S, T]
trait OptionReaction[E, S, T] extends ComposableReaction[E, S, Option[T]], FilterableReaction[E, S, Option[T]]

A specialized version of ReactionADT where the result of the reaction is wrapped in an Option. This trait provides composition and filtering for reactions that return an Option[T].

A specialized version of ReactionADT where the result of the reaction is wrapped in an Option. This trait provides composition and filtering for reactions that return an Option[T].

Type parameters

T

The type of the result wrapped in the Option.

Attributes

Supertypes
trait FilterableReaction[E, S, Option[T]]
trait ComposableReaction[E, S, Option[T]]
trait ReactionADT[E, S, Option[T]]
class Object
trait Matchable
class Any
Show all
opaque trait ReactionADT[E, S, R]

A data type used for representing a reaction to a given event

A data type used for representing a reaction to a given event

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait ComposableReaction[E, S, R]
trait OptionReaction[E, S, T]
trait FilterableReaction[E, S, R]