data v0.2.4 Data.Constructor

Link to this section Summary

Link to this section Types

Link to this opaque

field(a, b)

(opaque)
field(a, b)
Link to this type

field_name()

field_name() :: atom()
Link to this type

field_opts(a)

field_opts(a) :: [optional: bool(), default: a]
Link to this type

field_spec(a, b)

field_spec(a, b) ::
  {field_name(), Data.Parser.t(a, b)}
  | {field_name(), Data.Parser.t(a, b), field_opts(b)}
Link to this type

input()

input() :: map() | Keyword.t()
Link to this opaque

t(a, b)

(opaque)
t(a, b)

Link to this section Functions

Link to this function

new(field_specs)

new([field_spec(a, b)]) :: FE.Result.t(t(a, b), Error.t())
Link to this function

run(constructor, input)

run(t(any(), any()), input()) :: FE.Result.t(map(), Error.t())
Link to this function

struct(field_specs, struct_module, input)

struct([field_spec(any(), any())], module(), input()) ::
  FE.Result.t(struct(), Error.t())