Workspace ManagerconceptAPI 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.

config.Workspace.to_yaml

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

#[must_use] pub fn to_yaml(&self) -> String

Render this workspace as tmuxp-style YAML.

Description#

Emits the keys this crate acts on and nothing else, so a document that came from Self::from_yaml() and back may be shorter than it started: what is dropped is what unsupported_keys already named.

Examples#

use tmux_workspace::Workspace;
let workspace = Workspace::from_yaml(
"
session_name: demo
windows:
- window_name: editor
panes: [htop]
",
)?;
// What it writes, it can read.
assert_eq!(Workspace::from_yaml(&workspace.to_yaml())?, workspace);

Guides#

Pages that discuss to_yaml.

Esc

Type to search.

Reference previewOpen reference