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

server.Principal

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

View as Markdown

Module
server
Package
libtmux
Source
crates/libtmux/src/server.rs
enum server.Principal
enum [source]
enum [source]
enum server.Principal

Whether an AccessRule names 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 U or G so a caller can tell them apart. A release before that mark existed prints a bare name (R)/name (W) line with no marker at all -- every row such a release can print names a user, so decoding one reports Principal::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

Members

  • Group constant The entry names an operating-system group.
  • User constant The entry names an operating-system user.
Esc

Type to search.