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

server.discovery.SessionTree

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.SessionTree
structoverload [source]
structoverload [source]
struct server.discovery.SessionTree

One session and everything under it, from Server::hierarchy .

Examples

let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("work").await?;
session.new_window("editor").await?;
// One round of listings for the whole hierarchy, rather than one call per
// session and another per window.
let tree = guard.server().hierarchy().await?;
let found = tree
.iter()
.find(|branch| branch.session.name().to_string_lossy() == "work")
.expect("the session just created");
assert_eq!(found.windows.len(), 2);
guard.shutdown().await?;

2 declared, 0 inherited

Members

  • windows attribute Its windows, in tmux's order. A window linked into several sessions appears under each of them, as the listings report it.
  • session attribute The session.
Esc

Type to search.