# src.WorkspaceBuilder.build

- **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#L263
- **Page:** https://libtmux.org/en/rs/latest/workspace/reference/src-workspacebuilder-build/

```
src.WorkspaceBuilder.build(self, workspace: &Workspace) -> Result<Session, BuildError>
```

Create the session a workspace describes, and return it.

Windows and panes are created in the order the configuration lists
them. Nothing is attached: the caller decides whether to take over a
terminal.

# Errors

Returns an error when a session of the same name exists, or when tmux
refuses any step.
