Packages
estructura
1.2.4
1.13.0
1.12.0
1.11.0
1.10.2
1.10.1
1.10.0
1.9.0
1.8.3
1.8.2
1.8.1
1.8.0
1.7.2
1.7.1
1.7.0
1.6.1
1.6.0
1.5.0
1.4.2
1.4.1
1.4.0
1.3.3
1.3.2
1.3.1
1.3.0
1.2.12
1.2.11
1.2.10
1.2.9
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.1
1.1.0
1.0.0
0.6.0
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.2
0.4.1
0.4.0
0.3.2
0.3.1
0.3.0
0.2.0
0.1.0
Extensions for Elixir structures.
Current section
Files
Jump to
Current section
Files
lib/estructura/config.ex
defmodule Estructura.Config do
@moduledoc """
The configuration of the `Estructura` that is built from the parameters,
passed as a second argument in a call to `use Estructura`.
One normally does not need to meddle with this module.
"""
@typedoc "The generator to be passed to `use Estructura` should be given in one of these forms"
@type generator :: {module(), atom()} | {module(), atom(), [any()]} | (-> any())
@typedoc "The structure key"
@type key :: atom()
@typedoc "The structure value"
@type value :: any()
@typedoc "The configuration of `Estructura`"
@type t :: %{
__struct__: __MODULE__,
access: boolean(),
coercion: false | true | [key()],
validation: false | true | [key()],
colleactable: false | key(),
enumerable: boolean(),
generator: [{key(), generator()}]
}
defstruct access: true,
coercion: false,
validation: false,
collectable: false,
enumerable: false,
generator: false
end