libtmux Reference MCP Search
On this page

query.Matcher

View as Markdown

Module
query
Package
libtmux
Source
crates/libtmux/src/query.rs
trait query.Matcher
trait [source]
trait [source]
trait query.Matcher

A predicate that evaluates a borrowed candidate.

Functions and closures with the same signature implement this trait.

Examples

use libtmux::query::Matcher;

struct IsEven;

impl Matcher<i32> for IsEven {
    fn matches(&self, candidate: &i32) -> bool {
        candidate % 2 == 0
    }
}

assert!(IsEven.matches(&2));
assert!(!IsEven.matches(&3));

0 declared, 0 inherited

Esc

Type to search.