# `Estructura.Nested.Type`
[🔗](https://github.com/am-kantox/estructura/blob/v1.12.0/lib/estructura/nested/type.ex#L1)

The type to be used for coercing, validating, and generation
  of the implementation’s instances.

# `coerce`

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

Coerces the value coming from outside

# `generate`

```elixir
@callback generate() :: StreamData.t(any())
```

The generator for the type

# `generate`

```elixir
@callback generate(opts :: keyword()) :: StreamData.t(any())
```

The generator for the type accepting options

# `generate`

```elixir
@callback generate(opts :: keyword(), payload :: any()) :: StreamData.t(any())
```

The generator for the type accepting options

# `produce`
*optional* 

```elixir
@callback produce(keyword()) :: Enumerable.t()
```

The producer for the type accepting options
  (differs from `generate/1` being a non-shrinkable usually infinite stream)

# `validate`

```elixir
@callback validate(term()) :: {:ok, term()} | {:error, any()}
```

Validates the value as being correct

---

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