Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

query.Matcher

Rust
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

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.