# `Bolty.Policy`

Resolved driver behaviour for a single connection.

Resolved from the negotiated Bolt version (and optionally the HELLO response
metadata) at connection time, then stashed on the connection state and threaded
into every pack/unpack/message call. Code pattern-matches on policy fields and
never reads a Bolt or server version directly.

Policy is an internal distillation of negotiated facts, not a user-facing
configuration surface. Users influence policy by passing connection options
(e.g. constraining `:versions` at negotiation).

# `datetime`

```elixir
@type datetime() :: :legacy | :evolved
```

DateTime encoding dialect.

  * `:legacy` — emit legacy struct tags (0x46/0x66). Required for Bolt 4.x
    wire regardless of server version.
  * `:evolved` — emit evolved struct tags (0x49/0x69). Required for Bolt 5.x.

# `notifications_field`

```elixir
@type notifications_field() ::
  :notifications_disabled_categories | :notifications_disabled_classifications
```

HELLO wire field name for disabled notification categories/classifications.

  * `:notifications_disabled_categories` — Bolt ≤ 5.5
  * `:notifications_disabled_classifications` — Bolt 5.6+ (spec rename)

# `t`

```elixir
@type t() :: %Bolty.Policy{
  cypher_25: boolean(),
  cypher_5: boolean(),
  datetime: datetime(),
  dynamic_labels: boolean(),
  gql_errors: boolean(),
  notifications_field: notifications_field(),
  vectors: boolean()
}
```

---

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