On this page
session.Session.detach_clients
- Module
- session
- Declared in
- Session
- Package
- libtmux
- Source
- crates/libtmux/src/session.rs
-
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::clients_or_emptybefore and after.Errors
Returns an error when tmux cannot be reached or refuses the detach for any other reason.
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?;
0 declared, 0 inherited