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

query.fields.EnumField.is_in

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

View as Markdown

Module
query.fields
Declared in
EnumField
Package
libtmux
Source
crates/libtmux/src/query/fields.rs
is_in ( self , values : impl IntoIterator<Item = E> ) → FilterExpr<T>
method [source]
method [source]
is_in

Test membership using custom enum values' stable filter names.

Examples

use libtmux::query::{EnumField, FilterEnum};
use libtmux::query::__private;
enum State { Ready, Blocked }
impl FilterEnum for State {
const FILTER_VARIANTS: &'static [&'static str] = &["ready", "blocked"];
fn filter_name(&self) -> &'static str {
match self { Self::Ready => "ready", Self::Blocked => "blocked" }
}
}
struct Row;
let field: EnumField<Row, State> = __private::enum_field("row", "state");
let _ = field.is_in([State::Ready, State::Blocked]);

0 declared, 0 inherited

Esc

Type to search.