# `RustQ.Native.Descriptor`
[🔗](https://github.com/dannote/rustq/blob/v0.11.1/lib/rustq/native/descriptor.ex#L1)

Resolved metadata for a `RustQ.Native.Ref`.

A descriptor combines a native reference with parsed `RustQ.Syn` method
metadata and, when available, a web source link derived from Cargo metadata.

# `expected_arg`

```elixir
@type expected_arg() ::
  :self_ref
  | {:ref, String.t()}
  | {:impl_trait, String.t(), [String.t()]}
  | {:path, String.t()}
  | :any
```

# `expected_return`

```elixir
@type expected_return() :: {:ref, String.t()} | {:path, String.t()} | :none | :any
```

# `t`

```elixir
@type t() :: %RustQ.Native.Descriptor{
  method: RustQ.Syn.Method.t(),
  ref: RustQ.Native.Ref.t(),
  source_url: String.t() | nil
}
```

# `assert_shape!`

```elixir
@spec assert_shape!(
  t(),
  keyword()
) :: t()
```

Validates a descriptor's method argument/return shape.

# `resolve!`

```elixir
@spec resolve!(RustQ.Syn.Index.t(), RustQ.Native.Ref.t()) :: t()
```

Resolves a native method reference through a `RustQ.Syn.Index`.

# `resolve!`

```elixir
@spec resolve!(RustQ.Syn.Index.t(), RustQ.Native.Ref.t(), keyword()) :: t()
```

Resolves a native method reference and validates its argument/return shape.

---

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