Handles all dispatched actions
Handles all dispatched actions
Provides the initial value for the model
Provides the initial value for the model
Adds a new ActionProcessor[M]
to the action processing chain.
Adds a new ActionProcessor[M]
to the action processing chain. The processor is called for
every dispatched action.
Composes multiple handlers into a single handler.
Composes multiple handlers into a single handler. Processing stops as soon as a handler is able to handle
the action. If none of them handle the action, None
is returned
Dispatch the action, call change listeners when completed
Dispatch the action, call change listeners when completed
Action to dispatch
Perform actual dispatching, without calling change listeners
Perform actual dispatching, without calling change listeners
Folds multiple handlers into a single function so that each handler is called in turn and an updated model is passed on to the next handler.
Folds multiple handlers into a single function so that each handler is called
in turn and an updated model is passed on to the next handler. Returned ActionResult
contains the final model
and combined effects.
Handle a non-fatal error, such as dispatching an action with no action handler.
Handle a non-fatal error, such as dispatching an action with no action handler.
Error message
Handle a fatal error.
Handle a fatal error. Override this function to do something with exceptions that occur while dispatching actions.
Action that caused the exception
Exception that was thrown
Removes a previously added ActionProcessor[M]
from the action processing chain.
Subscribes to listen to changes in the model.
Subscribes to listen to changes in the model. By providing a cursor
you can limit
what part of the model must change for your listener to be called. If omitted, all changes
result in a call.
Model reader returning the part of the model you are interested in.
Function to be called when model is updated. The listener function gets the model reader as a parameter.
A function to unsubscribe your listener
Zoom into the model using the get
function
Zoom into the model using the get
function
Function that returns the part of the model you are interested in
A ModelR[T]
giving you read-only access to part of the model
Zoom into the model using get
and set
functions
Zoom into the model using get
and set
functions
Function that returns the part of the model you are interested in
Function that updates the part of the model you are interested in
A ModelRW[T]
giving you read/update access to part of the model
(Since version 0.5.1) Use composeHandlers or foldHandlers instead