options.OptionSchema
Rust
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- options
- Package
- libtmux
- Source
- crates/libtmux/src/options.rs
-
What tmux declares about one option.
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());
6 declared, 0 inherited
Members
- choices method Return the words a
OptionKind::Choiceoption accepts, in tmux's order. - range method Return the inclusive range a
OptionKind::Numberoption accepts. - accepts method Report whether tmux will place a write of this option at
scope. - kind method Return what kind of value the option holds.
- name method Return the option's tmux name.
- scopes method Return every table the option may be written in.