pinchpi_extension behaviour (pinchpi v0.1.0)

Summary

Callbacks

dispatch/3

-callback dispatch(binary(), [term()], pinchpi_context:ctx()) -> {ok, term(), pinchpi_context:ctx()} | error.

functions/0

-callback functions() -> [binary()].

name/0

-callback name() -> binary().

register/1

(optional)
-callback register(pinchpi_context:ctx()) -> pinchpi_context:ctx().

Functions

dispatch(Rest, Name, Args, Ctx)

-spec dispatch([module()], binary(), [term()], pinchpi_context:ctx()) ->
                  {ok, term(), pinchpi_context:ctx()} | error.

has_function(Rest, Lower)

-spec has_function([module()], binary()) -> boolean().

names(Exts)

-spec names([module()]) -> [binary()].

register_all(Exts, Ctx)

-spec register_all([module()], pinchpi_context:ctx()) -> pinchpi_context:ctx().