Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

struct libtmux-rs latest

OptionSchema

What tmux declares about one option.

Source and package
Qualified name
libtmux::options::OptionSchema
Module
options
Package
libtmux
Source
crates/libtmux/src/options.rs
struct options.OptionSchema

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#

Other members4#

  • 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.
Esc

Type to search.

Reference previewOpen reference