Tune.UI.Recipe behaviour (Tune v0.5.0)

Copy Markdown View Source

The application-code boundary used by the optional Tune UI.

Summary

Callbacks

build(t)

@callback build(Tune.UI.Study.t()) :: {:ok, Tune.t()} | {:error, term()}

default_config()

@callback default_config() :: map()

description()

@callback description() :: String.t()

id()

@callback id() :: String.t()

label()

@callback label() :: String.t()

normalize_config(map)

(optional)
@callback normalize_config(map()) :: {:ok, map()} | {:error, Exception.t()}

normalize_data(map)

(optional)
@callback normalize_data(map()) :: {:ok, map()} | {:error, Exception.t()}

preview_input(t)

@callback preview_input(Tune.UI.Study.t()) :: {:ok, term()} | {:error, term()}