Definition of a character type, used by use Jido.Character.
Stores compile-time configuration for character modules:
module- The module that defined this character typeextensions- List of enabled extensions (atoms)defaults- Default attribute values for new charactersadapter- Persistence adapter moduleadapter_opts- Options passed to the persistence adapterrenderer- Renderer module implementingJido.Character.Rendererbehaviourrenderer_opts- Options passed to the renderer
Summary
Functions
Creates a new Definition struct from a map, validating with Zoi schema.
Creates a new Definition struct from a map, raising on validation errors.
Returns the Zoi schema for Definition
Types
Functions
Creates a new Definition struct from a map, validating with Zoi schema.
Examples
iex> Jido.Character.Definition.new(%{module: MyApp.Character})
{:ok, %Jido.Character.Definition{module: MyApp.Character, extensions: [], ...}}
iex> Jido.Character.Definition.new(%{})
{:error, _validation_errors}
Creates a new Definition struct from a map, raising on validation errors.
Examples
iex> Jido.Character.Definition.new!(%{module: MyApp.Character})
%Jido.Character.Definition{module: MyApp.Character, extensions: [], ...}
Returns the Zoi schema for Definition