View Source API Reference estructura v1.3.0

Modules

Estructura is a set of extensions for Elixir structures, such as Access implementation, Enumerable and Collectable implementations, validations and test data generation via StreamData.

The implementation of Estructura ready to work with tree AST-like structure

Behaviour for coercion delegates. Instead of implementing the coercion handlers in Estructura.Nested inplace, one might do

Default coercer for :date, coercing strings (ISO8601) and integers (epoch)

Default coercer for :datetime, coercing strings (ISO8601) and integers (epoch)

Default coercer for :float, coercing strings and integers by multiplying by 1.0

Default coercer for :integer, coercing strings and floats by rounding

Nullable coercer for :date, coercing strings and floats by rounding, allows nil value

Nullable coercer for :datetime, coercing strings and floats by rounding, allows nil value

Nullable coercer for :float, coercing strings and floats by rounding, allows nil value

Nullable coercer for :integer, coercing strings and floats by rounding, allows nil value

Nullable coercer for :time, coercing strings and floats by rounding, allows nil value

Default coercer for :time, coercing strings (ISO8601) and integers (epoch)

The configuration of the Estructura that is built from the parameters, passed as a second argument in a call to use Estructura.

Full Example

The field stub allowing lazy instantiation of Estructura fields.

The implementation of lazy map implementing lazy Access for its keys.

The nested struct with helpers to easily describe it and produce validation, coercion, and generation helpers.

Additional generators to be used with __generator__/1 generated by Use Estructura

Nested example. The source code of the file follows.