Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

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

module libtmux-erlang latest

tmux_model

Validated native domain records. Constructors perform no tmux I/O.

Source and package
Qualified name
tmux_model
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_model.erl

Description#

Missing optional observations remain not_loaded; required identity fields must be supplied. Unavailable capabilities remain unavailable. Neither state means an empty relation or known absence. Rows created by new/2 and the entity constructors are detached. Entity constructors accept generated input-map types such as pane_input/0. Use new/2 to validate dynamic maps; Dialyzer checks known constructor shapes but does not replace runtime validation. Use tmux_server:bind/2 to register a fresh observed row for actions; use tmux_snapshot for captured graph relationships.

Observed rows carry a private observation/0 value. Actions compare it with the row's origin, snapshot identity and target fields, rejecting mismatched observations before I/O. Valid-shaped binding mismatches return observation_mismatch; detached and malformed rows keep their validation errors. Retarget through tmux_server:bind/2; it reads current values. This protects ordinary API use, not authority against trusted code in the Erlang VM.

Native model version 2 adds this association. Discard version-1 rows and snapshots on upgrade and freshly observe them. to_map/1 extracts domain fields for explicit schema validation; maps carry no actionable origin.

Members29#

Common operations6#

  • #session{} struct
  • #window{} struct
  • #pane{} struct
  • new/2 function Construct a detached row from validated observations.
  • pane_input/0 typealias Trusted constructor fields for pane/1. Required keys use :=; optional observations may be not_loaded or unavailable. Integral floats are normalized to integers. Runtime validation still checks ranges, IDs, UTF-8 and derived values. Use new/2 for dynamically validated maps.
  • to_map/1 function Return domain field values without origin or capture metadata. This is not the portable filter wire representation. Performs no I/O.

Other members23#

  • #window_link{} struct
  • entity/1 function Return the built-in entity kind of a native row without I/O.
  • get/2 function Read a permitted domain field without I/O. Unknown fields raise unknown_field; unloaded and unavailable values remain distinct.
  • model_version/1 function Read the native model version. Unknown versions fail validation; record internals are not a persistence format.
  • observation/0 typealias Private captured target association, created by observation. Retain with its row; construction and field access are internal. It is not an authorization or serialization format.
  • origin/1 function Read the opaque origin token, or none for a detached row. This does not revalidate endpoint lifetime.
  • pane_id/0 typealias A canonical pane ID binary in the percent namespace; nominal checking is by Dialyzer.
  • pane/0 typealias A validated pane observation. Native records are experimental in OTP 29.
  • pane/1 function Construct a detached pane row, validating required fields and scalar bounds without tmux I/O.
  • row/0 typealias One schema-defined native domain record, with separate origin and capture metadata.
  • session_id/0 typealias A canonical session ID binary in the dollar namespace.
  • session_input/0 typealias Trusted constructor fields for session/1. Required keys use :=; optional observations may be not_loaded or unavailable. Integral floats are normalized to integers. Runtime validation still checks ranges, IDs, UTF-8 and derived values. Use new/2 for dynamically validated maps.
  • session/0 typealias A validated session observation. Native records are experimental in OTP 29.
  • session/1 function Construct a detached session row, validating required fields and scalar bounds without tmux I/O.
  • snapshot_id/1 function Read the capture identity, or none when not associated with a snapshot. Performs no I/O.
  • validate/1 function Validate native row shape, model version and normalized observations. Exported records do not enforce these invariants at construction. Performs no I/O.
  • window_id/0 typealias A canonical physical-window ID binary in the at-sign namespace.
  • window_input/0 typealias Trusted constructor fields for window/1. Required keys use :=; optional observations may be not_loaded or unavailable. Integral floats are normalized to integers. Runtime validation still checks ranges, IDs, UTF-8 and derived values. Use new/2 for dynamically validated maps.
  • window_link_input/0 typealias Trusted constructor fields for window_link/1. Required keys use :=; optional observations may be not_loaded or unavailable. Integral floats are normalized to integers. Runtime validation still checks ranges, IDs, UTF-8 and derived values. Use new/2 for dynamically validated maps.
  • window_link/0 typealias A validated window_link observation. Native records are experimental in OTP 29.
  • window_link/1 function Construct a detached window_link row, validating required fields and scalar bounds without tmux I/O.
  • window/0 typealias A validated window observation. Native records are experimental in OTP 29.
  • window/1 function Construct a detached window row, validating required fields and scalar bounds without tmux I/O.

Guides#

Pages that discuss tmux_model.

Esc

Type to search.

Reference previewOpen reference