# `RustQ.Binding.Callable`
[🔗](https://github.com/dannote/rustq/blob/v0.11.1/lib/rustq/binding/callable.ex#L1)

Normalized callable signature metadata for RustQ lowering and binding generation.

A callable turns parsed `RustQ.Syn` function/method metadata into a shape that
Rusty-Elixir lowering can query without depending on raw Syn nodes. Argument
and return types are converted to `RustQ.Meta.Type` via `RustQ.Spec.from_syn/1`.
This is the lookup-friendly signature layer needed before type-driven
propagation inference can decide whether a call should lower with Rust `?`.

# `arg`

```elixir
@type arg() :: %{
  name: String.t() | nil,
  type: RustQ.Meta.Type.t(),
  syn: RustQ.Syn.Arg.t()
}
```

# `t`

```elixir
@type t() :: %RustQ.Binding.Callable{
  args: [arg()],
  docs: [String.t()],
  kind: :function | :method,
  name: String.t(),
  native_ref: RustQ.Native.Ref.t() | nil,
  returns: RustQ.Meta.Type.t() | nil,
  source_line: pos_integer() | nil,
  source_path: Path.t() | nil,
  source_url: String.t() | nil,
  syn: RustQ.Syn.Function.t() | RustQ.Syn.Method.t() | nil,
  target: String.t() | nil
}
```

# `from_native_descriptor`

```elixir
@spec from_native_descriptor(RustQ.Native.Descriptor.t()) :: t()
```

Builds callable metadata from a resolved native method descriptor.

# `from_spec`

```elixir
@spec from_spec(atom(), [RustQ.Meta.Type.t()], RustQ.Meta.Type.t()) :: t()
```

Builds callable metadata from a RustQ `@spec`.

# `from_syn_function`

```elixir
@spec from_syn_function(RustQ.Syn.Function.t()) :: t()
```

Builds callable metadata from a parsed Rust free function.

# `from_syn_method`

```elixir
@spec from_syn_method(
  RustQ.Syn.Method.t(),
  keyword()
) :: t()
```

Builds callable metadata from a parsed Rust impl method.

# `return_type!`

```elixir
@spec return_type!(t()) :: RustQ.Meta.Type.t()
```

Returns the callable return type or raises when the callable returns unit.

---

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