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

client.Client.is_own

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

View as Markdown

Module
client
Declared in
Client
Package
libtmux
Source
crates/libtmux/src/client.rs
is_own ( self ) → bool
method [source]
method [source]
is_own

Report whether this process opened this client itself.

tmux counts a control connection as an attached client, and this crate opens them: crate::Pane::stream_output , crate::control::ControlMode::attach and the waits built on them all show up in a client listing beside a human's terminal. A caller asking "is anybody watching this session" means anybody *else*, so this is the question to ask before counting.

false for every client once this process ends, since the answer is about connections this Server is still holding open.

Examples

let others = server
.clients()
.await?
.into_iter()
.filter(|client| !client.is_own())
.count();

0 declared, 0 inherited

Esc

Type to search.