EventReactionADT
An abstract data type for effectful event reactions.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object TrackingEventReaction
Members list
Type members
Types
The type of the reaction's environment, i.e., its context.
The type of the reaction's environment, i.e., its context.
Attributes
The type of the event triggering the reaction.
The type of the event triggering the reaction.
Attributes
A computational reaction to an Event within a given Environment, abstracted over an effect F
(e.g., IO
, Task
, etc.).
A computational reaction to an Event within a given Environment, abstracted over an effect F
(e.g., IO
, Task
, etc.).
Attributes
The outcome of the reaction application, i.e., the result of the reaction.
The outcome of the reaction application, i.e., the result of the reaction.
Attributes
Value members
Concrete methods
Creates an EventReaction from the provided effectful reaction function.
Creates an EventReaction from the provided effectful reaction function.
Type parameters
- F
-
the effect type of the reaction.
Attributes
- Returns
-
the created EventReaction.
Extensions
Extensions
Composes two EventReactions by chaining their execution, running this reaction first, followed by the provided other reaction, within the effectful context F
.
Composes two EventReactions by chaining their execution, running this reaction first, followed by the provided other reaction, within the effectful context F
.
Value parameters
- other
-
the EventReaction to execute after this one
Attributes
- Returns
-
a new EventReaction with the combined behavior of the two reactions.
Executes the event reaction by applying the provided environment and event, resulting in an Outcome wrapped in the effect type F[_]
. The computation is deferred and executed within the effect context.
Executes the event reaction by applying the provided environment and event, resulting in an Outcome wrapped in the effect type F[_]
. The computation is deferred and executed within the effect context.
Value parameters
- environment
-
the Environment (context) in which the event reaction computation occurs
- event
-
the Event triggering the reaction
Attributes
- Returns
-
an effect
F
containing the resulting Outcome of processing the event.