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

config.Workspace.to_yaml

Rust
  • Python Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

config.Workspace.to_yaml ( self ) → String
method [source]
method [source]
config.Workspace.to_yaml

Render this workspace as tmuxp-style YAML.

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);

Discussed in Use the Rust workspace builder , Rust workspace builder behavior , Rust workspace builder API

Esc

Type to search.