Estructura.Coercer behaviour (estructura v1.11.0)
View SourceBehaviour for coercion delegates. Instead of implementing the coercion handlers
in Estructura.Nested inplace, one might do
coerce do
defdelegate foo.bar.created_at(value), to: :date
endAvailable coercers out of the box:
Estructura.Coercers.AtomEstructura.Coercers.DateEstructura.Coercers.DateTimeEstructura.Coercers.FloatEstructura.Coercers.IntegerEstructura.Coercers.TimeEstructura.Coercers.NullableDateEstructura.Coercers.NullableDatetimeEstructura.Coercers.NullableFloatEstructura.Coercers.NullableIntegerEstructura.Coercers.NullableTime
Summary
Callbacks
Coerces the input value to the type handled by a respective coercer