options.OptionScope
Rust
- Python Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- options
- Package
- libtmux
- Source
- crates/libtmux/src/options.rs
-
Which table an option primarily lives in.
Examples
use libtmux::{OptionScope, option_schema};// The scope says which handle can set an option, which is not guessable// from the name: `mouse` is per-session, and `exit-empty` is server-wide.assert!(option_schema("mouse").is_some_and(|o| o.accepts(OptionScope::Session)));assert!(option_schema("exit-empty").is_some_and(|o| o.accepts(OptionScope::Server)));// Some options live in two tables at once, and tmux takes a write at// either. Asking for one scope would have to pick, and picking is wrong.let remain = option_schema("remain-on-exit").expect("a documented option");assert_eq!(remain.scopes(), [OptionScope::Window, OptionScope::Pane]);
4 declared, 0 inherited