On this page
server.Server.access_rules
- Module
- server
- Declared in
- Server
- Package
- libtmux
- Source
- crates/libtmux/src/server.rs
- access_rules ( self ) Result<Vec<AccessRule>, Error>
-
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::UnsupportedCapabilitybelow 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.meets(&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