- Module
- session
- Declared in
- Session
- Package
- libtmux
- Source
- crates/libtmux/src/session.rs
- Other languages
- PythonTypeScriptGoJava.NETC++Swift
-
Detach every client attached to this session.
Succeeds when no client was attached. tmux reports that as a failure, but the state this asks for -- nobody attached to this session -- is already true, and a caller that has to tell "detached them" from "there was nobody" can compare
crate::Server::clientsbefore and after.Errors
Returns an error when tmux cannot be reached or refuses the detach for any other reason.
In other ports Detach every client attached to a session
Examples
let guard = libtmux::test::TestServer::new().await?;let session = guard.server().new_session("busy").await?;
// Nothing is attached in a headless fixture, so this is a no-op.session.detach_clients().await?;
guard.shutdown().await?;>>> with control_mode() as ctl:... session.detach_client()await session.detach();0 declared, 0 inherited