Snapshot
Captured graph with explicit completeness
Source and package
- Qualified name
-
LibTmux:: Snapshot - Module
- LibTmux
- Package
- LibTmux
- Source
- packages/core/lib/LibTmux/Snapshot.pm
- package Lib
Tmux:: ;Snapshot -
Description#
EXECUTION
All methods in this module operate on local captured data and perform no tmux I/O. Ordering is deterministic; public query methods do not mutate membership. Typed validation/evaluation errors propagate. See
"snapshot" in LibTmux::Serverfor explicit acquisition andLibTmux::Xfor machine-readable failures.
Members14#
Collections and queries4#
- sessions method Return a fresh
LibTmux::SessionSelectionin captured order. Empty loaded collections yield empty selections; unloaded collections throw. - windows method Return a fresh
LibTmux::WindowSelectioncontaining each physical window identity once. Context lives in"window_links". - panes method Return a fresh
LibTmux::PaneSelectioncontaining each physical pane identity once. Membership edits cannot change the graph store. - clients method Return a fresh
LibTmux::ClientSelectionin captured order. A loaded empty client set is valid.
Common operations3#
- session_by_id method
session_by_id('$1')returns aLibTmux::Sessionor undef. Single quotes preserve the dollar-prefixed ID instead of interpolating a regex capture. - window_by_id method
window_by_id('@3')returns one physicalLibTmux::Windowor undef, independent of session link context. - pane_by_id method
pane_by_id('%3')returns aLibTmux::Paneor undef. The returned handle retains the captured graph after this wrapper goes out of scope.
Other members7#
- complete method Return the capture completeness Boolean. The strict live acquisition path fails on incomplete topology; it does not synthesize empty relations.
- from_records method
from_records(server_id => ..., generation => ..., sessions => [...], windows => [...], window_links => [...], panes => [...], clients => [...])constructs a detached graph. Scalar records and relation IDs are copied. Omitted fields/collections remain unloaded; null is explicit. Invalid identities or inconsistent complete topology throw typed acquisition errors. - generation method Return the captured daemon generation.
LibTmux::Serverchecks it before mutations through captured handles; retained snapshots never silently refresh. - metadata method Return a fresh metadata hash with capture start/end, daemon version, and PID where acquired. Several commands observe an interval; the snapshot is not an atomic tmux transaction.
- server_id method Return the captured server scope. Entity IDs are meaningful only within this scope and
"generation". - to_records method Return independent scalar records and adjacency IDs for detached use. No handles or live transport are serialized.
- window_links method Return a fresh
LibTmux::WindowLinkSelectionretaining every session/index association, including repeated links of one physical window.