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.

MoreLess about this notice

method libtmux-rs

Server.validate_layouts

Validate every planned layout before scripts or tmux mutations.

Source and package
Qualified name
libtmux::server::Server::validate_layouts
Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server.rs
pub async fn validate_layouts<'a>( &self, layouts: impl IntoIterator<Item = (&'a OsStr, usize)>, ) -> Result<(), Error>
Completion
Returns a future that runs when awaited.signature · server.rs:912
Errors
Returns Error::InvalidLayout for invalid syntax, ambiguous names or insufficient pane cells, Error::UnsupportedCapability for layouts unavailable on the daemon, Error::UnsupportedTmuxVersion below the core floor, or the version probe's transport/decode error.doc comment · :898
tmux version
Needs tmux 3.8.doc comment · :891

Description

Each item pairs layout bytes with the required pane count. Classic layouts are checked for checksums, nonempty trees, unsigned fields and depth up to 256 nested groups. tmux owns geometry correction and pruning. JSON layouts require tmux 3.8 or newer; tmux validates their contents. The version check queries the daemon even when no layouts need a version check; a cold endpoint uses the selected executable. Unique name abbreviations are accepted.

Errors

Returns Error::InvalidLayout for invalid syntax, ambiguous names or insufficient pane cells, Error::UnsupportedCapability for layouts unavailable on the daemon, Error::UnsupportedTmuxVersion below the core floor, or the version probe's transport/decode error.

Type parameters
Parameters

Examples

use std::ffi::OsStr;
server.validate_layouts([(OsStr::new("even-h"), 2)]).await?;

Recorded calls

source calls
No call edges in the Rust model.

The Rust reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls server.Server.validate_layouts.

Esc
Search in

Type to search.

Reference previewOpen reference