# `Espex.BluetoothProxy.Descriptor`
[🔗](https://github.com/bbangert/espex/blob/main/lib/espex/bluetooth_proxy/descriptor.ex#L1)

A GATT descriptor inside a `Espex.BluetoothProxy.Characteristic`.

Built by `Espex.BluetoothProxy` adapters and passed inside service
trees during `c:Espex.BluetoothProxy.gatt_get_services/1` streaming.
Espex converts to the wire `BluetoothGATTDescriptor` at the send
boundary.

## UUID encoding

See `Espex.BluetoothProxy.encode_uuid/1` for the rules — the `:uuid`
field accepts either a 16-byte binary (full 128-bit) or a small
non-negative integer (Bluetooth SIG short UUID).

# `t`

```elixir
@type t() :: %Espex.BluetoothProxy.Descriptor{
  handle: non_neg_integer(),
  uuid: Espex.BluetoothProxy.uuid()
}
```

# `new`

```elixir
@spec new(keyword()) :: t()
```

Build a descriptor from keyword options.

# `to_proto`

```elixir
@spec to_proto(t()) :: Espex.Proto.BluetoothGATTDescriptor.t()
```

Convert to the wire `Proto.BluetoothGATTDescriptor`.

---

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