# `Estructura.Coercer`
[🔗](https://github.com/am-kantox/estructura/blob/v1.13.0/lib/estructura/coercers.ex#L1)

Behaviour for coercion delegates. Instead of implementing the coercion handlers
  in `Estructura.Nested` inplace, one might do
    
```elixir
coerce do
  defdelegate foo.bar.created_at(value), to: :date
end
```

Available coercers out of the box:

- `Estructura.Coercers.Atom`
- `Estructura.Coercers.Date`
- `Estructura.Coercers.DateTime`
- `Estructura.Coercers.Float`
- `Estructura.Coercers.Integer`
- `Estructura.Coercers.Time`
- `Estructura.Coercers.NullableDate`
- `Estructura.Coercers.NullableDatetime`
- `Estructura.Coercers.NullableFloat`
- `Estructura.Coercers.NullableInteger`
- `Estructura.Coercers.NullableTime`

# `coerce`

```elixir
@callback coerce(value) :: {:ok, value} | {:error, any()} when value: term()
```

Coerces the input value to the type handled by a respective coercer

---

*Consult [api-reference.md](api-reference.md) for complete listing*
