Filter
A validated portable predicate over one observed entity type.
Source and package
- Qualified name
-
LibTmux .Filter - Module
- LibTmux
- Package
- libtmux
- Source
- lib/libtmux/filter.ex
-
Description#
Keywords are trusted shorthand for maps. Fields in one object conjoin; duplicate keyword keys are rejected recursively.
notat a field negates equality, while Booleannottakes one criteria object. Lists require an explicit operator. Native callbacks belong toLibTmux.Selection.filter/2. This value contains data; executable preparation remains separate.
Members11#
Common operations3#
- from_json/3 function Decodes bounded JSON, rejecting duplicate object keys and trailing data.
- new/3 function Normalizes criteria and validates field/operator/value domains before evaluation.
- to_wire/1 function Returns the explicit versioned string-keyed wire representation.
Other members8#
- criteria/0: criteria() :: %{optional(atom()) => term()} | keyword(term()) typealias Local map criteria or keyword shorthand; field and operand domains are validated at construction.
- from_wire/3 function Decodes a whitelisted versioned map; raw JSON must use from_json to retain duplicate keys.
- input/0: input() :: criteria() | t() typealias Trusted criteria data or a previously validated filter for the same entity.
- limit_option/0: limit
_option () :: {:max_bytes, pos_integer ()} | {:max_depth, pos_integer ()} | {:max_nodes, pos_integer ()} | {:max_list, pos_integer ()} | {:max_string_bytes, pos_integer ()} typealias A positive resource ceiling; byte, depth, node, list and string budgets validate independently. - limits/0: limits() :: %{
max_bytes: pos
_integer (), max_depth: pos_integer (), max_nodes: pos_integer (), max_list: pos_integer (), max_string_bytes: pos_integer () } typealias Resolved constructor budgets; wire limits also cover the versioned envelope. - new!/3 function Constructs a filter or raises its structured validation error.
- t/0 typealias Validated portable predicate data; executable predicates are prepared separately.
- to_predicate/2 function Prepares a local unary predicate after validating captured coverage, including empty domains.