Workspace ManagerAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

config.Workspace.from_yaml_strict

This type appears in public signatures. It is not a package entry point.

config.Workspace.from_yaml_strict (source: &str) → Result<Self, ConfigError>

Parse as Self::from_yaml does, refusing a key that is neither this parser's own vocabulary nor tmuxp's, unless it starts with x-.

Description#

This is the policy the tmux-workspace command applies to every document it loads.

Errors

What Self::from_yaml returns, and also an unrecognized key.

Examples#

use tmux_workspace::Workspace;
let error = Workspace::from_yaml_strict("session_name: demo\nwindows: []\nfrobnicate: 1\n")
.expect_err("an unrecognized key is refused");
assert!(error.to_string().contains("frobnicate"));
Esc

Type to search.

Reference preview Open reference