# LibTmux.Snapshot

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

An indexed immutable graph observed over a capture interval.

Construction and traversal perform no I/O. `fields` declares loaded fields
over the supplied entity IDs; `complete` declares complete server entity
sets. Missing declarations remain unloaded, including on empty sets.
Unavailable capabilities use a separate declaration. Relations require
complete join domains. A snapshot reserves no tmux objects.

## Members

### Collections and queries

- [`sessions/1`](/en/elixir/latest/reference/libtmux-snapshot-sessions-1/) (function): Returns a materialized session selection without I/O.
- [`windows/1`](/en/elixir/latest/reference/libtmux-snapshot-windows-1/) (function): Returns a materialized physical window selection without I/O.
- [`panes/1`](/en/elixir/latest/reference/libtmux-snapshot-panes-1/) (function): Returns a materialized physical pane selection without I/O.
- [`clients/1`](/en/elixir/latest/reference/libtmux-snapshot-clients-1/) (function): Returns a materialized attached-client selection without I/O.
- [`sessions`](/en/elixir/latest/reference/libtmux-snapshot-sessions/) (property)
- [`windows`](/en/elixir/latest/reference/libtmux-snapshot-windows/) (property)
- [`panes`](/en/elixir/latest/reference/libtmux-snapshot-panes/) (property)
- [`clients`](/en/elixir/latest/reference/libtmux-snapshot-clients/) (property)

### Common operations

- [`fetch/3`](/en/elixir/latest/reference/libtmux-snapshot-fetch-3/) (function): Looks up one exact observed ID without I/O.
- [`items/2`](/en/elixir/latest/reference/libtmux-snapshot-items-2/) (function): Returns plain observed items in stable identity order without loading data.
- [`new/2`](/en/elixir/latest/reference/libtmux-snapshot-new-2/) (function): Validates observed rows, rejecting conflicts, invalid fields and dangling covered references.
- [`related/4`](/en/elixir/latest/reference/libtmux-snapshot-related-4/) (function): Resolves one source's covered relation through captured indexes; never refreshes.

### Other members

- [`captured_from`](/en/elixir/latest/reference/libtmux-snapshot-captured_from/) (property): Required: building the struct without this key is an error.
- [`captured_until`](/en/elixir/latest/reference/libtmux-snapshot-captured_until/) (property): Required: building the struct without this key is an error.
- [`coverage`](/en/elixir/latest/reference/libtmux-snapshot-coverage/) (property): Required: building the struct without this key is an error.
- [`coverage/0`](/en/elixir/latest/reference/libtmux-snapshot-coverage-0/) (typealias): Declared entity sets and field availability; completeness is separate from an empty captured set.
- [`entity_coverage/0`](/en/elixir/latest/reference/libtmux-snapshot-entity_coverage-0/) (typealias): Coverage of one captured entity domain; missing field entries are unloaded.
- [`id`](/en/elixir/latest/reference/libtmux-snapshot-id/) (property): Required: building the struct without this key is an error.
- [`indexes`](/en/elixir/latest/reference/libtmux-snapshot-indexes/) (property)
- [`indexes/0`](/en/elixir/latest/reference/libtmux-snapshot-indexes-0/) (typealias): Maps each session ID to the IDs of its window links and clients, and each window ID to the IDs of its window links and panes. Traverse with `related/4`; the layout is not part of the contract.
- [`option/0`](/en/elixir/latest/reference/libtmux-snapshot-option-0/) (typealias): Construction metadata: one server instance, ordered millisecond timestamps and explicit coverage declarations.
- [`order`](/en/elixir/latest/reference/libtmux-snapshot-order/) (property)
- [`require_complete!/2`](/en/elixir/latest/reference/libtmux-snapshot-require_complete-bang-2/) (function): Requires a declared complete entity set, even when it has no rows.
- [`require_field!/3`](/en/elixir/latest/reference/libtmux-snapshot-require_field-bang-3/) (function): Requires a loaded field over the captured entity domain before evaluation.
- [`require_relation!/4`](/en/elixir/latest/reference/libtmux-snapshot-require_relation-bang-4/) (function): Requires relation coverage for the requested source IDs, including known-empty relations.
- [`rows/0`](/en/elixir/latest/reference/libtmux-snapshot-rows-0/) (typealias): Observed rows grouped by canonical entity; construction validates and deduplicates their identities.
- [`schema_version`](/en/elixir/latest/reference/libtmux-snapshot-schema_version/) (property)
- [`server_instance`](/en/elixir/latest/reference/libtmux-snapshot-server_instance/) (property): Required: building the struct without this key is an error.
- [`t/0`](/en/elixir/latest/reference/libtmux-snapshot-t-0/) (typealias): An immutable observation interval with indexed entities and explicit coverage.
- [`window_links`](/en/elixir/latest/reference/libtmux-snapshot-window_links/) (property)
- [`window_links/1`](/en/elixir/latest/reference/libtmux-snapshot-window_links-1/) (function): Returns a materialized membership selection without I/O.
