server.Principal
Rust
- Python Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- server
- Package
- libtmux
- Source
- crates/libtmux/src/server.rs
-
Whether an
AccessRulenames an operating-system user or group.tmux originally listed only users. A later release let the server owner add a whole group to the access list, and marks each listed entry
UorGso a caller can tell them apart. A release before that mark existed prints a barename (R)/name (W)line with no marker at all -- every row such a release can print names a user, so decoding one reportsPrincipal::User.Examples
use libtmux::Principal;for rule in server.access_rules().await? {match rule.principal() {Principal::User => println!("{} (user)", rule.name()),Principal::Group => println!("{} (group)", rule.name()),}}
2 declared, 0 inherited