# LibTmux.Filter

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/filter.ex#L1
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-filter/

A validated portable predicate over one observed entity type.

Keywords are trusted shorthand for maps. Fields in one object conjoin;
duplicate keyword keys are rejected recursively. `not` at a field negates
equality, while Boolean `not` takes one criteria object. Lists require an
explicit operator. Native callbacks belong to `LibTmux.Selection.filter/2`.
This value contains data; executable preparation remains separate.

## Members

### Common operations

- [`from_json/3`](/en/elixir/latest/reference/libtmux-filter-from_json-3/) (function): Decodes bounded JSON, rejecting duplicate object keys and trailing data.
- [`new/3`](/en/elixir/latest/reference/libtmux-filter-new-3/) (function): Normalizes criteria and validates field/operator/value domains before evaluation.
- [`to_wire/1`](/en/elixir/latest/reference/libtmux-filter-to_wire-1/) (function): Returns the explicit versioned string-keyed wire representation.

### Other members

- [`criteria/0`](/en/elixir/latest/reference/libtmux-filter-criteria-0/) (typealias): Local map criteria or keyword shorthand; field and operand domains are validated at construction.
- [`from_wire/3`](/en/elixir/latest/reference/libtmux-filter-from_wire-3/) (function): Decodes a whitelisted versioned map; raw JSON must use from_json to retain duplicate keys.
- [`input/0`](/en/elixir/latest/reference/libtmux-filter-input-0/) (typealias): Trusted criteria data or a previously validated filter for the same entity.
- [`limit_option/0`](/en/elixir/latest/reference/libtmux-filter-limit_option-0/) (typealias): A positive resource ceiling; byte, depth, node, list and string budgets validate independently.
- [`limits/0`](/en/elixir/latest/reference/libtmux-filter-limits-0/) (typealias): Resolved constructor budgets; wire limits also cover the versioned envelope.
- [`new!/3`](/en/elixir/latest/reference/libtmux-filter-new-bang-3/) (function): Constructs a filter or raises its structured validation error.
- [`t/0`](/en/elixir/latest/reference/libtmux-filter-t-0/) (typealias): Validated portable predicate data; executable predicates are prepared separately.
- [`to_predicate/2`](/en/elixir/latest/reference/libtmux-filter-to_predicate-2/) (function): Prepares a local unary predicate after validating captured coverage, including empty domains.
