Server.validate_layouts
Validate every planned layout before scripts or tmux mutations.
Source and package
- Qualified name
-
server.Server .validate _layouts - Module
- server
- Declared in
- Server
- Package
- libtmux
- Source
- crates/libtmux/src/server.rs
-
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-rc2 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::InvalidLayoutfor invalid syntax, ambiguous names or insufficient pane cells,Error::UnsupportedCapabilityfor layouts unavailable on the daemon,Error::UnsupportedTmuxVersionbelow the core floor, or the version probe's transport/decode error.Examples#
use std::ffi::OsStr;server.validate_layouts([(OsStr::new("even-h"), 2)]).await?;