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

server.discovery.WindowTree

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

View as Markdown

Module
server.discovery
Package
libtmux
Source
crates/libtmux/src/server/discovery.rs
struct server.discovery.WindowTree
structoverload [source]
structoverload [source]
struct server.discovery.WindowTree

One window and its panes, from Server::hierarchy .

Examples

use libtmux::SplitDirection;
let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("work").await?;
let window = session.active_window().await?.expect("a session has a window");
window.split(SplitDirection::Below).await?;
let tree = guard.server().hierarchy().await?;
let panes: usize = tree
.iter()
.flat_map(|branch| branch.windows.iter())
.map(|branch| branch.panes.len())
.sum();
assert_eq!(panes, 2);
guard.shutdown().await?;

2 declared, 0 inherited

Members

  • panes attribute Its panes, in tmux's order.
  • window attribute The window, carrying the link it was reached through.
Esc

Type to search.