cizen v0.3.0 Cizen.Effect behaviour View Source

The effect behaviour.

Link to this section Summary

Link to this section Types

Link to this type alias_of() View Source
alias_of() :: {:alias_of, t()}
Link to this type consume() View Source
consume() :: {:consume, term()}
Link to this type resolve() View Source
resolve() :: {:resolve, term()}

Link to this section Functions

Link to this function handle_event(handler, event, effect, state) View Source
handle_event(handler(), Cizen.Event.t(), t(), state :: term()) ::
  resolve() | consume() | term()
Link to this function init(handler, effect) View Source
init(handler(), t()) :: resolve() | {t(), term()}

Link to this section Callbacks

Link to this callback handle_event(handler, arg1, t, state) View Source
handle_event(handler(), Cizen.Event.t(), t(), state :: term()) ::
  resolve() | consume() | term()
Link to this callback init(handler, t) View Source
init(handler(), t()) :: resolve() | alias_of() | term()