Telegex.Plug v0.0.2 Telegex.Plug behaviour View Source

Updates processing plug-in.

Link to this section Summary

Types

State data.

Stateful call result, return type and new state.

The stateless call result directly returns the type.

Callbacks

Pass update and call.

Link to this section Types

Specs

state() :: any()

State data.

Specs

stateful() :: {stateless(), state()}

Stateful call result, return type and new state.

Specs

stateless() :: :ok | :error | :ignored

The stateless call result directly returns the type.

Link to this section Callbacks

Specs

call(update :: Telegex.Model.Update.t(), state :: state()) ::
  stateless() | stateful()

Pass update and call.