Core Library0.xAPI Reference

Choose documentation 1

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

module libtmux-raku latest

LibTmux.Selection

Source and package
Qualified name
LibTmux::Selection
Declared in
LibTmux
Package
LibTmux
Source
lib/LibTmux/Selection.rakumod
Anonymous module

Description#

Captured selections

A concrete selection consumes Selection[Pane, 'pane'] or another catalogue entity schema. new(:items) copies finite, eager, defined membership. It does not deep-clone member objects. Observation classes must supply their own read-only field contract.

Binding my @panes := $snapshot.panes preserves the selection. Array assignment materializes ordinary array membership; assigning to a scalar itemizes the selection. Use $panes.List when explicit list traversal is wanted. Each iterator and Seq is fresh. Array conversion is independently mutable; List membership cannot be replaced.

where accepts criterion data or a compiled Filter and validates the schema before traversal. filter invokes one callback per member, eagerly in source order, and throws a directly returned Failure before Boolean coercion. Both return the same concrete selection type and preserve order and duplicates. Native grep, map, sort, first and junctions delegate to the captured List, including grep adverbs. They retain native return and evaluation rules. one constructs a junction; exact cardinality uses single.

Members1#

  • Selection trait Eager captured membership; transformations perform no acquisition or commands.
Esc

Type to search.

Reference previewOpen reference