ActionableContext

DSL entry-point for configuring an Reaction by attaching Actions and Conditions.

This object is intended to be used with Kotlin context receivers, so that the target Reaction instance is implicitly available in the current scope.

Both action and condition mutate the current Reaction by appending the provided element to its internal collections. Ordering is preserved and duplicates are allowed.

Functions

Link copied to clipboard
context(reaction: Reaction<T>)
fun <T> action(action: Action<T>)

Appends the given Action to the current Reaction.

Link copied to clipboard
context(reaction: Reaction<T>)
fun <T> condition(condition: Condition<T>)

Appends the given Condition to the current Reaction.