# `PhoenixGenApi.ImplHelper`
[🔗](https://github.com/ohhi-vn/phoenix_gen_api/blob/main/lib/phoenix_gen_api/helpers/impl_helper/impl.ex#L1)

# `__using__`
*macro* 

Macro to generate simple implementation of protocol.
Support for easy to use with general encoder.

Utility macro to generate implementation for struct.

The target struct must have `encode!/2` function in module.

Usage:

```Elixir
use PhoenixGenApi.ImplHelper, encoder: JSON.Encoder, impl: [AModule1, AModule2, ...]
```

Using macro without option in `use` keyword.
Target module must have `encode!/2` function
Generate implementation from struct for JSON.Encoder like this:

```Elixir
require PhoenixGenApi.ImplHelper

gen_impl JSON.Encoder, AModule
```

# `gen_impl`
*macro* 

---

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