An ordered, materialized Enumerable over one captured entity type.
Enumeration never refreshes or performs I/O. where/2 accepts predicate
data; filter/2 accepts unary Elixir functions with Enum truthiness.
Holding a selection retains its snapshot graph. Enum.to_list/1 projects
ordinary values when graph context is no longer needed.
Summary
Types
An ordered selection retaining items of one observation type and their originating snapshot.
Functions
Counts observed matching items; use size/1 for cached unfiltered size.
Returns true on the first matching observed item.
Filters with a unary local function; normal predicate exceptions propagate.
Checks native identity separately from Enumerable element membership.
Materializes the observed items of an entity without I/O.
Returns exactly one match, or a structured cardinality error; stops at the second match.
Returns exactly one match or raises its cardinality error.
Returns one match or nil; a second match remains an error.
Returns one match or nil, raising on multiple matches.
Returns cached materialized size in constant time.
Filters validated data while retaining order and captured graph context.
Types
@type t() :: t(LibTmux.Schema.observation())
A selection without a concrete observation type; use t/1 to preserve item types.
@opaque t(item)
An ordered selection retaining items of one observation type and their originating snapshot.
Functions
@spec count(t(), LibTmux.Filter.input()) :: non_neg_integer()
Counts observed matching items; use size/1 for cached unfiltered size.
@spec exists?(t(), LibTmux.Filter.input()) :: boolean()
Returns true on the first matching observed item.
@spec filter(t(item), (item -> as_boolean(term()))) :: t(item) when item: LibTmux.Schema.observation()
Filters with a unary local function; normal predicate exceptions propagate.
@spec member_id?(t(), LibTmux.Ref.id()) :: boolean()
Checks native identity separately from Enumerable element membership.
@spec new(LibTmux.Snapshot.t(), :session | LibTmux.Session) :: t(LibTmux.Session.t())
@spec new(LibTmux.Snapshot.t(), :window | LibTmux.Window) :: t(LibTmux.Window.t())
@spec new(LibTmux.Snapshot.t(), :pane | LibTmux.Pane) :: t(LibTmux.Pane.t())
@spec new(LibTmux.Snapshot.t(), :window_link | LibTmux.WindowLink) :: t(LibTmux.WindowLink.t())
@spec new(LibTmux.Snapshot.t(), :client | LibTmux.Client) :: t(LibTmux.Client.t())
Materializes the observed items of an entity without I/O.
@spec one(t(item), LibTmux.Filter.input()) :: {:ok, item} | {:error, LibTmux.Error.t()} when item: LibTmux.Schema.observation()
Returns exactly one match, or a structured cardinality error; stops at the second match.
@spec one!(t(item), LibTmux.Filter.input()) :: item when item: LibTmux.Schema.observation()
Returns exactly one match or raises its cardinality error.
@spec one_or_nil(t(item), LibTmux.Filter.input()) :: {:ok, item | nil} | {:error, LibTmux.Error.t()} when item: LibTmux.Schema.observation()
Returns one match or nil; a second match remains an error.
@spec one_or_nil!(t(item), LibTmux.Filter.input()) :: item | nil when item: LibTmux.Schema.observation()
Returns one match or nil, raising on multiple matches.
@spec size(t()) :: non_neg_integer()
Returns cached materialized size in constant time.
@spec where(t(item), LibTmux.Filter.input()) :: t(item) when item: LibTmux.Schema.observation()
Filters validated data while retaining order and captured graph context.