# `RustQ.Syn.Type`
[🔗](https://github.com/dannote/rustq/blob/v0.11.1/lib/rustq/syn.ex#L54)

Namespace for structured Rust type metadata.

Each type node includes `code`, the rendered Rust tokens for display or
diagnostics. Prefer matching on the structured fields when making semantic
decisions.

# `impl_trait?`

```elixir
@spec impl_trait?(RustQ.Syn.type(), String.t(), [String.t()]) :: boolean()
```

Returns true when `type` is `impl Trait<Args...>` matching the requested trait and args.

# `path?`

```elixir
@spec path?(RustQ.Syn.type(), String.t()) :: boolean()
```

Returns true when `type` is a path whose final segment is `name`.

# `ref_to?`

```elixir
@spec ref_to?(RustQ.Syn.type(), String.t()) :: boolean()
```

Returns true when `type` is a reference to a path whose final segment is `name`.

# `type_name`

```elixir
@spec type_name(RustQ.Syn.type()) :: String.t() | nil
```

Returns the final path-like name for common type metadata nodes.

---

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