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.

method libtmux-rs latest

Server.set_typed_option

Set one server option to a typed value, checked before it is sent.

Source and package
Qualified name
libtmux::server::Server::set_typed_option
Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server/settings.rs
pub async fn set_typed_option( &self, name: &str, value: impl Into<OptionValue>, ) -> Result<(), Error>

Description#

The value must be the variant Self::typed_option() reads back for the option; OptionValue gives the rules, and what is not checked.

Errors

Returns Error::OptionValueRefused without sending anything when tmux's option table refuses the value, and Error::OptionScopeMismatch when the option is not a server option. Otherwise returns an error when tmux rejects the name or value.

Examples#

server.set_typed_option("escape-time", 10).await?;
Parameters

tmux command#

The tmux commands behind set_typed_option.

tmux C API#

The C declarations in tmux that implement these commands.

Esc

Type to search.

Reference previewOpen reference