Stone v0.1.0 Stone.Responders

Various macros useful for returning simpler responses from init/call/cast/info handlers.

Summary

Macros

Set initial state of the actor. Should be used in definit/defstart

Set initial state of the actor and timeout for initialization. Should be used in definit/defstart. Allows for setting a timeout

Macros

initial_state(state)

Set initial state of the actor. Should be used in definit/defstart.

Examples

iex> Stone.Responders.initial_state(1)
{:ok, 1}
initial_state(state, timeout)

Set initial state of the actor and timeout for initialization. Should be used in definit/defstart. Allows for setting a timeout.

Example

noreply()
noreply_and_set(new_state)
reply(response)
reply_and_set(response, new_state)