SessionTree
One session and everything under it, from Server::hierarchy().
Source and package
- Qualified name
-
libtmux::server:: discovery:: Session Tree - Module
- server.discovery
- Package
- libtmux
- Source
- crates/libtmux/src/server/discovery.rs
-
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?;