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

snapshot.ReadField

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

View as Markdown

Module
snapshot
Package
libtmux
Source
crates/libtmux/src/snapshot.rs
trait snapshot.ReadField
trait [source]
trait [source]
trait snapshot.ReadField

A field handle whose value a Target snapshot holds.

Every handle in PaneFields, WindowFields, SessionFields and ClientFields implements it for the handle type it filters, so the name that filters a field also reads it: pass the handle to Pane::get , Window::get , Session::get or Client::get . A read never asks tmux. The trait is sealed.

Examples

use libtmux::query::{Filterable as _, ReadField};
use libtmux::{Availability, Pane};
// Any field of a pane, read the same way.
fn read<F: ReadField<Pane>>(pane: &Pane, field: F) -> Availability<F::Value<'_>> {
pane.get(field)
}
let fields = Pane::filter_fields();
let column: Availability<u32> = read(pane, fields.cursor_x);

0 declared, 0 inherited

Esc

Type to search.