Selection
An ordered, materialized Enumerable over one captured entity type.
Source and package
- Qualified name
-
LibTmux .Selection - Module
- LibTmux
- Package
- libtmux
- Source
- lib/libtmux/selection.ex
-
Description#
Enumeration never refreshes or performs I/O.
where/2accepts predicate data;filter/2accepts unary Elixir functions with Enum truthiness. Holding a selection retains its snapshot graph.Enum.to_list/1projects ordinary values when graph context is no longer needed.Discussed in Read values, execute explicitly
Members13#
Common operations7#
- count/2 function Counts observed matching items; use size/1 for cached unfiltered size.
- filter/2 function Filters with a unary local function; normal predicate exceptions propagate.
- one!/2 function Returns exactly one match or raises its cardinality error.
- where/2 function Filters validated data while retaining order and captured graph context.
- member_id?/2 function Checks native identity separately from Enumerable element membership.
- one/2 function Returns exactly one match, or a structured cardinality error; stops at the second match.
- one_or_nil/2 function Returns one match or nil; a second match remains an error.
Other members6#
- exists?/2 function Returns true on the first matching observed item.
- new/2 function Materializes the observed items of an entity without I/O.
- one_or_nil!/2 function Returns one match or nil, raising on multiple matches.
- size/1 function Returns cached materialized size in constant time.
- t/0: t() :: t(Lib
Tmux ()) typealias A selection without a concrete observation type; use.Schema .observation t:t/1to preserve item types. - t/1 typealias An ordered selection retaining items of one observation type and their originating snapshot.