# query.fields.TextField

- **Module:** query.fields
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/query/fields.rs#L35
- **Page:** https://libtmux.org/en/rs/latest/reference/query-fields-textfield/

A typed handle for a portable text field on `T`.

All operators require strict UTF-8 in the candidate and return `false` for
invalid bytes before any outer logical negation. Rust membership authoring
accepts any `IntoIterator`; the version 1 wire representation uses an
array. A scalar string is not substring membership: use
[`TextField::contains`] for that operation.

`V` is the type a snapshot reads the field as: [`TmuxText`] unless the
field is a typed ID such as [`crate::PaneId`]. Filtering matches the text
either way.

## Example

```rust
use libtmux::query::TextField;
use libtmux::query::__private;

struct Row;
let field: TextField<Row> = __private::text_field("row", "name");
let _ = field.contains("build");
```

## Members

- `eq` (method): Compare a candidate with one exact string.
- `eq_ignore_case` (method): Compare using Unicode default case folding without normalization.
- `contains` (method): Test exact substring containment.
- `contains_ignore_case` (method): Test folded substring containment without normalization.
- `starts_with` (method): Test an exact string prefix.
- `starts_with_ignore_case` (method): Test a folded string prefix without normalization.
- `ends_with` (method): Test an exact string suffix.
- `ends_with_ignore_case` (method): Test a folded string suffix without normalization.
- `is_in` (method): Test exact membership in ordered string values.
- `not_in` (method): Test exact exclusion from ordered string values.
- `regex` (method): Compile and match a case-sensitive Rust regular expression.
- `regex_ignore_case` (method): Compile and match a Unicode case-insensitive Rust regular expression.
