Core Library0.xAPI reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

method libtmux-rs

Client.get

Read one field of this client's snapshot, named by the handle that filters it.

Source and package
Qualified name
libtmux::client::Client::get
Module
client
Declared in
Client
Package
libtmux
Source
crates/libtmux/src/client.rs
#[cfg(feature = "query")] impl Client #[must_use] pub fn get<F: ReadField<Self>>( &self, field: F ) -> Availability<F::Value<'_>>

Description

Every field in ClientFields reads this way, including those with no getter of their own. Nothing is sent to tmux, so the value is as old as the snapshot. The result says why a field holds no value: see Availability.

Type parameters
Parameters

Examples

use libtmux::Client;
use libtmux::query::Filterable as _;
let fields = Client::filter_fields();
for client in server.clients().await? {
// The key table a client is in: `prefix` right after the prefix key.
if let Some(table) = client.get(fields.client_key_table).available() {
println!("{client}: {}", table.to_string_lossy());
}
}

Recorded calls

source calls
No call edges in the Rust model.

The Rust reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls client.Client.get.

Esc
Search in

Type to search.

Reference previewOpen reference