# `ExGram.Middleware`
[🔗](https://github.com/rockneurotiko/ex_gram/blob/0.65.0/lib/ex_gram/middleware.ex#L1)

Behaviour for creating middlewares.

Middlewares receive the context (`ExGram.Cnt`) and can modify it before passing
it to the next middleware or handler. Use middlewares for authentication, logging,
rate limiting, or enriching the context with additional data.

See the [Middlewares](middlewares.md) guide for usage examples.

# `opts`

```elixir
@type opts() ::
  binary()
  | tuple()
  | atom()
  | integer()
  | float()
  | [opts()]
  | %{required(opts()) =&gt; opts()}
```

# `call`

```elixir
@callback call(ExGram.Cnt.t(), opts()) :: ExGram.Cnt.t()
```

# `init`
*optional* 

```elixir
@callback init(opts()) :: opts()
```

# `add_extra`

# `add_extra`

# `halt`

---

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