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

session.Session.lock

Rust
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust
  • Go
  • Java Unavailable
  • .NET
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
session
Declared in
Session
Package
libtmux
Source
crates/libtmux/src/session.rs
Other languages
Python Ruby Lua TypeScript Go Java .NET C++ Swift
lock ( self ) → Result<(), Error>
method [source]
method [source]
lock

Lock every client attached to this session.

tmux runs the lock-command to 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?;
In other ports Lock every client attached to a session

0 declared, 0 inherited

Esc

Type to search.