snapshot
Source and package
- Qualified name
-
LibTmux. snapshot - Module
- LibTmux
- Package
- LibTmux
- Source
- src/acquisition.jl
- snapshot( connection::Lib
Tmux , scope::Union{Lib.Control Connection Tmux , Lib.Session Ref Tmux }; kwargs..., )snapshot( connection::Lib.Window Ref Tmux ; timeout, cancel, )snapshot( server::Lib.Control Connection Tmux , scope::Union{Lib.Server Tmux , Lib.Session Ref Tmux }; kwargs..., )snapshot(server::Lib.Window Ref Tmux ; timeout, cancel).Server -
Methods
snapshot( connection::Lib
Tmux , scope::Union{Lib.Control Connection Tmux , Lib.Session Ref Tmux }; kwargs..., )[source].Window Ref Capture an exact session or window through the existing control connection. Return the same scoped view and membership coverage as
snapshot(server, scope). The scope may belong to another session on this daemon. Connection identity binds the capture; two topology observations share one total deadline.snapshot(connection, scope::Union{SessionRef,WindowRef}; timeout=5.0, cancel=nothing)snapshot( connection::Lib
Tmux ; timeout, cancel, )[source].Control Connection Acquire the captured graph over the existing terminal control connection. Two observations must agree on topology, with at most one retry within the deadline. Field values are captured observations, not an atomic transaction. The connection's two attached clients are included in client/attachment counts. Local collection and coverage semantics match
snapshot(server).snapshot(connection::ControlConnection; timeout=5.0, cancel=nothing)snapshot( server::Lib
Tmux , scope::Union{Lib.Server Tmux , Lib.Session Ref Tmux }; kwargs..., )[source].Window Ref Capture one exact session or physical window and return its captured view. A session includes all its window links and physical panes; each window's links to other sessions remain uncaptured. A window includes all its panes, all links to sessions and those sessions' scalar fields; those sessions' other window memberships remain uncaptured. Attached client records are not acquired.
snapshot(server, scope::Union{SessionRef,WindowRef}; timeout=5.0, cancel=nothing)snapshotof(view)owns a partial graph. Its server-wide root collections raiseSnapshotCoverageError; navigate from the returned view instead. Two topology observations and daemon identity checks share one deadline with at most one topology retry. Exact references reject cross-server and stale generations; subprocess generation checks remain best effort.snapshot(server::Lib
Tmux ; timeout, cancel)[source].Server Capture sessions, physical windows/panes, contextual links and attached clients. Transient unattached command clients are outside tmux's
list-clientssource. Accessors and filtering use only this captured graph. New acquisitions never refresh earlier values. Retaining a selection may retain its whole snapshot.snapshot(server; timeout=5.0, cancel=nothing)Two observations must agree on topology and observed daemon identity. A topology race retries once within one monotonic deadline. This is a stable local observation after acquisition, not a transaction or reservation. The
acquiredinterval contains process-relative monotonic seconds.Subprocess generation (PID and start time) and client incarnation (PID and creation time) are best-effort observations. They do not provide strict protection against identity reuse or the check/use race during later actions.
- Parameters
-
-
connection(LibTmux ) for.Control Connection snapshot(connection, scope, kwargs);snapshot(connection, timeout, cancel) -
scope(Union{LibTmux , Lib.Session Ref Tmux }) for.Window Ref snapshot(connection, scope, kwargs);snapshot(server, scope, kwargs) -
kwargsforsnapshot(connection, scope, kwargs);snapshot(server, scope, kwargs) -
timeout=5.0(Real) forsnapshot(connection, timeout, cancel);snapshot(server, timeout, cancel) -
cancel=nothing(Union{Nothing, CancellationToken }) forsnapshot(connection, timeout, cancel);snapshot(server, timeout, cancel) -
server(LibTmux ) for.Server snapshot(server, scope, kwargs);snapshot(server, timeout, cancel)
-
Recorded calls
source callsThe Julia reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.snapshot.
tmux command
task materialThe tmux commands behind snapshot.
list-clients (a session exists) list-panes -a server scope, cmd_list_panes_server (a session exists) list-sessions list-windows -a server scope, cmd_list_windows_exec (a session exists) display-message (on a Server) tmux C API
task materialThe C declarations in tmux that implement these commands.
Guides
task materialPages that discuss snapshot.
- Concepts
- Examples
- Guides
In other ports
task equivalence 19 other ports mappedSource-verified mappings for Capture the tmux hierarchy. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.
| Port | API | Differs from Julia |
|---|---|---|
| Julia | Lib | This page |
| Ruby | Lib Behavior: Snapshot acquisition. | None recorded in the model |
| Lua | libtmux | None recorded in the model |
| PowerShell | Lib Capture a replacement tmux hierarchy. | Acquires a replacement LibTmux.Server to -Depth (panes by default). Acquisition is not atomic; retained handles do not refresh. |
| Erlang | tmux Capture a complete immutable graph with default capture limits. Performs I/O. See snapshot/2 for bounds, consistency and conflict errors. | Captures a new graph over an observation interval. Retained snapshots never refresh. |
| Elixir | Lib Captures a new graph explicitly, with bounded work and read retries. | Captures a new graph over an observation interval. A retained Snapshot never refreshes. |
| Common Lisp | libtmux: Acquire an eager native graph; all later accessors on it are local.
TIMEOUT controls one acquisition deadline and OUTPUT-LIMIT caps combined output,
including at most two retries after contradictory observations. Synchronous
setup and additional cleanup can extend caller wall time. ROW-LIMIT bounds each listing;
ENTITY-LIMIT bounds the complete graph; FIELD-LIMIT bounds encoded field bytes.
No daemon is started. A live daemon with zero sessions yields empty vectors;
connection/listing failures remain errors. Closing CLIENT leaves this snapshot
usable. This is an interval observation, not a transactional snapshot. | fetch-snapshot acquires a new interval observation. Retained snapshots never refresh in place. |
| TypeScript | server Acquire an immutable view of the server at this instant. | None recorded in the model |
| Rust | server Fetch the whole hierarchy in three commands. | async Fetches the whole hierarchy with list-sessions, list-windows -a and list-panes -a, and stitches the rows by winlink. The three listings are separate commands, so the capture is not an atomic transaction. |
| Go | tmux Snapshot materializes sessions, winlinks, panes, and clients. Its sequential commands produce an observationally consistent result, not an atomic transaction. Failures remain errors rather than empty snapshots; cancellation may occur after earlier listings completed. | None recorded in the model |
| Java | io Captures the whole hierarchy in at most four listings, retrying once if the server is replaced. | None recorded in the model |
| Clojure | libtmux Acquires an eager captured graph from an explicit server. | Acquires a captured graph of persistent values. Retained values do not refresh after mutation or close. |
| Kotlin | io Captures the whole hierarchy in at most four listings, retrying once if the server is replaced. | async |
| Scala | io Captures the whole hierarchy in at most four listings, retrying once if the server is replaced. | None recorded in the model |
| C# | Lib Reads the server and answers a handle carrying what it found. | None recorded in the model |
| F# | Lib Returns a new server handle captured to the requested depth. | Acquires a replacement shared .NET LibTmux.Server to the requested depth. Acquisition is not atomic; retained handles do not refresh. |
| Swift | Server Reads every object from one daemon incarnation. | async |
| OCaml | Libtmux Acquire a complete graph over a recorded interval, with a fixed number of listing commands. Races fail validation. Access to returned values performs no I/O, including after closing the client. | Acquires a complete immutable graph over an interval. Earlier observations remain readable without refreshing. |
| Perl | Lib snapshot(). | Strict acquisition observes an interval, not an atomic transaction; retained handles do not refresh. |
| Raku | Lib Acquire a captured graph explicitly. Existing snapshots remain unchanged. | Explicit I/O captures an observation interval. Existing views and relationships remain local. |
no equivalent on Server
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
no equivalent on Server: sessions, windows, panes and clients each take a snapshot of one listing, and Snapshot::take needs the internal detail::Backend, so no public call reads the whole hierarchy at once