# options.OptionSchema

- **Module:** options
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/options.rs#L100
- **Page:** https://libtmux.org/en/rs/latest/reference/options-optionschema/

What tmux declares about one option.

## Example

```rust
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());
```

## Members

- `name` (method): Return the option's tmux name.
- `kind` (method): Return what kind of value the option holds.
- `scopes` (method): Return every table the option may be written in.
- `accepts` (method): Report whether tmux will place a write of this option at `scope`.
- `choices` (method): Return the words a [`OptionKind::Choice`] option accepts, in tmux's order.
- `range` (method): Return the inclusive range a [`OptionKind::Number`] option accepts.
