# src.WorkspaceBuilder.plan

- **Module:** src.WorkspaceBuilder
- **Package:** tmux-workspace
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/tmux-workspace/src/lib.rs#L137
- **Page:** https://libtmux.org/en/rs/latest/workspace/reference/src-workspacebuilder-plan/

```
src.WorkspaceBuilder.plan(self, workspace: &Workspace) -> Plan
```

Describe what building this workspace would do, without doing it.

The returned plan is inert, so a caller can render it, count what it
costs, or explain it before anything reaches tmux. Every object a later
step addresses is a forward reference to the step that makes it, so the
whole file lowers without a single round trip to look an id up.

## Example

```rust
use tmux_workspace::{Workspace, WorkspaceBuilder};

let workspace = Workspace::from_yaml(
    "
session_name: dev
windows:
  - window_name: editor
    panes:
      - vim
",
)?;

let server = libtmux::Server::builder()
    .socket_path("/tmp/libtmux-rs-test/plan-example.sock")
    .build()?;
let plan = WorkspaceBuilder::new(&server).plan(&workspace);

// Nothing has run, but the first command is already known.
assert!(plan.preview()[0]
    .as_ref()
    .is_some_and(|command| command.summary().to_string().contains("new-session")));
```
