# tmux_select:one_or_none/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_select.erl#L255
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_select-one_or_none-2/

```
one_or_none(Criteria, Selection)
-spec one_or_none(criteria(), t(Row)) ->
                     {ok, Row | none} | cardinality_error()
                     when Row :: tmux_model:row().
```

Validate local criteria and return one row or known absence. A second match is an explicit ambiguity error; performs no I/O.

## Parameters

- `Criteria` (`criteria()`)
- `Selection` (`t(Row)`)
