LibTmux.Ref (libtmux v0.0.1-alpha.1)

Copy Markdown View Source

An exact observed target bound to one server instance.

A window-link ID is its observed {session_id, index, window_id} binding, not a unique lifetime identifier. Validation detects known stale instances; it does not reserve an object or close a one-shot check/use race.

Summary

Types

The target kind; physical windows and session-relative links have different identities.

A native ID or observed session/index/window link binding; neither reserves an object's lifetime.

t()

An exact observed identity bound to a tmux server incarnation, separate from a connection epoch.

Functions

Validates a native identity and binds it to a nonempty instance token.

Rejects malformed references and known server-instance mismatches.

Types

entity()

@type entity() :: :session | :window | :pane | :window_link | :client

The target kind; physical windows and session-relative links have different identities.

id()

@type id() :: String.t() | {String.t(), non_neg_integer(), String.t()}

A native ID or observed session/index/window link binding; neither reserves an object's lifetime.

t()

@type t() :: %LibTmux.Ref{entity: entity(), id: id(), server_instance: String.t()}

An exact observed identity bound to a tmux server incarnation, separate from a connection epoch.

Functions

new(entity, id, instance)

@spec new(entity(), id(), String.t()) :: {:ok, t()} | {:error, LibTmux.Error.t()}

Validates a native identity and binds it to a nonempty instance token.

validate(ref, instance)

@spec validate(t(), String.t()) :: :ok | {:error, LibTmux.Error.t()}

Rejects malformed references and known server-instance mismatches.