Moves the action to the next state.
Moves the action to the next state.
New state for the action
New value for the action
A new instance of this action with updated state and value
Wraps a by-name future result into an effect using success and failure transformations.
Wraps a by-name future result into an effect using success and failure transformations.
Future to wrap, passes using by-name (lazy evaluation)
Transformation function for success case
Transformation function for failure case
An Effect
for running the provided Future
Moves this action to a failed state with the provided exception.
Moves this action to a failed state with the provided exception.
Reason for the failure.
Handles the action using the supplied partial function matching current state.
Handles the action using an external handler function.
Handles the action using an external handler function. The function is provided with instance of this
AsyncAction
, the ActionHandler
this action currently resides in and the provided update Effect
.
The current action handler instance.
Effect that performs the requested async operation.
External handler function
An action result
Moves this action to pending state.
Moves this action to ready state with a result value.
Moves this action to ready state with a result value.
Result for the action.
Base trait for asynchronous actions. Provides support for handling of multi-state actions. Implementation classes must implement
result
,next
andstate
functions. If you are usingPot
, consider usingPotAction
instead.Example:
Type of action result
Type of the actual action class