Core LibraryunreleasedAPI Reference

Choose documentation 2

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

class libtmux-perl latest

Snapshot

Captured graph with explicit completeness

Source and package
Qualified name
LibTmux::Snapshot
Module
LibTmux
Package
LibTmux
Source
packages/core/lib/LibTmux/Snapshot.pm

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::Server for explicit acquisition and LibTmux::X for machine-readable failures.

Members14#

Collections and queries4#

Common operations3#

  • session_by_id method session_by_id('$1') returns a LibTmux::Session or undef. Single quotes preserve the dollar-prefixed ID instead of interpolating a regex capture.
  • window_by_id method window_by_id('@3') returns one physical LibTmux::Window or undef, independent of session link context.
  • pane_by_id method pane_by_id('%3') returns a LibTmux::Pane or 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::Server checks 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::WindowLinkSelection retaining every session/index association, including repeated links of one physical window.
Esc

Type to search.

Reference previewOpen reference