# src.WorkspaceBuilder.build

- **Module:** src.WorkspaceBuilder
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/tmux-workspace/src/lib.rs#L250
- **Page:** https://libtmux.org/reference/rs/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.
