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

Rust API

Rust documentation

server.Server.access_rules

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

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server.rs
access_rules ( self ) → Result<Vec<AccessRule>, Error>
method [source]
method [source]
access_rules

The users on this server's access list.

The owner is always present and always writable, and tmux refuses to change their entry, so a caller cannot lock itself out.

Errors

Returns Error::UnsupportedCapability below tmux 3.3, and an error when tmux cannot be reached or refuses the listing.

Examples

let guard = libtmux::test::TestServer::new().await?;
let version = guard.server().capabilities().await?.tmux_version().clone();
// Whoever started the server owns it and may act.
if version.has_behavior(&libtmux::since::SERVER_ACCESS) {
let rules = guard.server().access_rules().await?;
assert_eq!(rules.len(), 1);
assert_eq!(rules[0].mode(), libtmux::AccessMode::Write);
}
guard.shutdown().await?;

0 declared, 0 inherited

Esc

Type to search.