# `Machete.IsAMatcher`
[🔗](https://github.com/mtrudel/machete/blob/main/lib/machete/matchers/is_a_matcher.ex#L2)

Defines a matcher that matches againt a type of struct

# `t`

```elixir
@opaque t()
```

Describes an instance of this matcher

# `is_a`

```elixir
@spec is_a(module() | struct()) :: t()
```

Matches against a type of struct. Similar to `Kernel.struct/2`, the argument may be a module name
or a struct instance. In both cases, the match is concerned solely with type equivalence.

Examples:

    iex> assert %URI{} ~> is_a(URI)
    true

    iex> assert %URI{} ~> is_a(%URI{})
    true

    iex> refute %URI{} ~> is_a(DateTime)
    false

---

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