Core Library0.xAPI reference

Choose documentation 1

pr-173

Current version

pr-173
English

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

MoreLess about this notice

function libtmux-elixir

Filter.to_predicate/2

Prepares a local unary predicate after validating captured coverage, including empty domains.

Source and package
Qualified name
LibTmux.Filter.to_predicate/2
Module
LibTmux
Declared in
Filter
Package
libtmux
Source
lib/libtmux/filter.ex
to_predicate(filter, options) @spec to_predicate(t(), [ {:snapshot, LibTmux.Snapshot.t()} ]) :: (LibTmux.Schema.observation() -> boolean())

Description

Relationship and count predicates require each input to equal the observation stored under its ID in snapshot. A missing or different observation raises LibTmux.Error with kind :observation_mismatch. Related values always come from the prepared snapshot; equal inputs from another capture are accepted.

Scalar-only predicates read the supplied observation and may be reused across captures. Each referenced field must be loaded: :unloaded raises :field_not_loaded and :unavailable raises :field_unavailable before Boolean evaluation. Known nullable values keep their comparison semantics; unreferenced fields need not be loaded. The snapshot validates coverage when preparing the predicate.

See the worked example.

Parameters

Recorded calls

source calls
No call edges in the Elixir model.

The Elixir reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.Filter.to_predicate/2.

Guides

task material

Pages that discuss to_predicate/2.

Esc
Search in

Type to search.

Reference previewOpen reference