# `Yex.DocServer.State`
[🔗](https://github.com/satoren/y_ex/blob/main/lib/server/doc_server.ex#L203)

Provides the `State` struct and functions to manage the internal state of `Yex.DocServer`.

This module allows tracking the state of `Yex.DocServer` through a structured `State` record.
It includes functions for assigning and updating state attributes with custom key-value pairs.

# `t`

```elixir
@type t() :: %Yex.DocServer.State{
  assigns: map(),
  awareness: Yex.Awareness.t() | nil,
  doc: Yex.Doc.t(),
  module: module()
}
```

# `assign`

```elixir
@spec assign(t(), [{term(), term()}] | map()) :: t()
```

Assigns multiple key-value pairs to the `assigns` map in the state.

This function accepts a list or map of attributes to update the state in
bulk, allowing for more comprehensive state updates at once.

# `assign`

```elixir
@spec assign(t(), term(), term()) :: t()
```

Assigns a single key-value pair to the `assigns` map in the state.

This function allows for adding or updating a specific attribute in the
state, useful for tracking individual properties in `Yex.DocServer`.

---

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