ActionReceiver

interface ActionReceiver<in A : MVIAction>

An entity that can receive different actions and then possibly emit them as an ActionProvider. Actions are collected by the ActionConsumer. This is most often implemented by a Store and exposed through PipelineContext

Inheritors

Functions

Link copied to clipboard
abstract suspend fun action(action: A)

Send a new side-effect to be processed by subscribers, only once. How actions will be distributed and handled depends on ActionShareBehavior. Actions that make the capacity overflow may be dropped or the function may suspend until the buffer is freed.

Link copied to clipboard
inline suspend fun <A : MVIAction> ActionReceiver<A>.action(vararg actions: A)

Alias for ActionReceiver.action for multiple actions

Link copied to clipboard
inline suspend fun <A : MVIAction> ActionReceiver<A>.emit(action: A)
inline suspend fun <A : MVIAction> ActionReceiver<A>.emit(vararg actions: A)

Alias for ActionReceiver.action for multiple actions

Link copied to clipboard
abstract fun send(action: A)

Alias for action with one difference - this function will launch a new coroutine to send the intent in background.

Link copied to clipboard
inline fun <A : MVIAction> ActionReceiver<A>.send(vararg actions: A)

Alias for ActionReceiver.send for multiple actions