# `Mar.Route`

`Mar.Route` protocol lets you access `Plug.Conn`.

```elixir
defmodule MyApp do
  # ...

  defimpl Mar.Route do
    # Mar.Route.MyApp

    def before_action(route) do
      # Access `route.conn` before the actions you have defined.
      route
    end

    def after_action(route) do
      # Access `route.conn` after the actions you have defined.
      route
    end
  end
end

```

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `after_action`

```elixir
@spec after_action(t()) :: t()
```

# `before_action`

```elixir
@spec before_action(t()) :: t()
```

---

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