On this page
session.Session.lock
- Module
- session
- Declared in
- Session
- Package
- libtmux
- Source
- crates/libtmux/src/session.rs
-
Lock every client attached to this session.
tmux runs the
lock-commandto lock, so what a locked client shows is that command's business rather than this one's.Errors
Returns an error when tmux cannot be reached or refuses the lock.
Examples
let guard = libtmux::test::TestServer::new().await?; let session = guard.server().new_session("locked").await?; // Locking a session nobody is attached to is accepted and does nothing. session.lock().await?; guard.shutdown().await?;
0 declared, 0 inherited