# LibTmux.Ref

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/ref.ex#L1
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-ref/

An exact observed target bound to one server instance.

A window-link ID is its observed `{session_id, index, window_id}` binding,
not a unique lifetime identifier. Validation detects known stale instances;
it does not reserve an object or close a one-shot check/use race.

## Members

### Common operations

- [`from_observation/1`](/en/elixir/latest/reference/libtmux-ref-from_observation-1/) (function): Builds a reference from an observation's own identity and server instance.
- [`id/0`](/en/elixir/latest/reference/libtmux-ref-id-0/) (typealias): A native ID or observed session/index/window link binding; neither reserves an object's lifetime.

### Other members

- [`entity`](/en/elixir/latest/reference/libtmux-ref-entity/) (property): Required: building the struct without this key is an error.
- [`entity/0`](/en/elixir/latest/reference/libtmux-ref-entity-0/) (typealias): The target kind; physical windows and session-relative links have different identities.
- [`id`](/en/elixir/latest/reference/libtmux-ref-id/) (property): Required: building the struct without this key is an error.
- [`new/3`](/en/elixir/latest/reference/libtmux-ref-new-3/) (function): Validates a native identity and binds it to a nonempty instance token.
- [`server_instance`](/en/elixir/latest/reference/libtmux-ref-server_instance/) (property): Required: building the struct without this key is an error.
- [`t/0`](/en/elixir/latest/reference/libtmux-ref-t-0/) (typealias): An exact observed identity bound to a tmux server incarnation, separate from a connection epoch.
- [`validate/2`](/en/elixir/latest/reference/libtmux-ref-validate-2/) (function): Rejects malformed references and known server-instance mismatches.
