Core LibraryalphaAPI Reference

Choose documentation 3

latest

Current version

latest
English

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

method libtmux-rs latest

Matcher.matches

Return whether candidate matches this predicate.

Source and package
Qualified name
query.Matcher.matches
Module
query
Declared in
Matcher
Package
libtmux
Source
crates/libtmux/src/query.rs
pub trait Matcher<T> fn matches(&self, candidate: &T) -> bool;

Examples#

use libtmux::query::Matcher;
let is_positive = |candidate: &i32| *candidate > 0;
assert!(is_positive.matches(&1));
assert!(!is_positive.matches(&-1));
Type parameters
Parameters
Esc

Type to search.

Reference preview Open reference