OptionSchema
What tmux declares about one option.
Source and package
- Qualified name
-
libtmux::options:: Option Schema - Module
- options
- Package
- libtmux
- Source
- crates/libtmux/src/options.rs
-
Examples#
use libtmux::{OptionKind, OptionScope, option_schema};let schema = option_schema("history-limit").expect("a documented option");assert_eq!(schema.name(), "history-limit");assert_eq!(schema.kind(), OptionKind::Number);assert_eq!(schema.scopes(), [OptionScope::Session]);assert!(schema.accepts(OptionScope::Session));// An option tmux does not have has no schema, which catches a typo before it// reaches the server.assert!(option_schema("history-limits").is_none());
Members6#
Common operations2#
- choices method Return the words a
OptionKind::Choiceoption accepts, in tmux's order. - range method Return the inclusive range a
OptionKind::Numberoption accepts.