# server.builder.ServerBuilder

- **Module:** server.builder
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server/builder.rs#L37
- **Page:** https://libtmux.org/en/rs/latest/reference/server-builder-serverbuilder/

A consuming builder for one inert [`Server`] handle.

## Example

```rust
use libtmux::{DispatchLimits, OutputLimits, Server};
use std::time::Duration;

// Naming a socket and a budget is the whole of the configuration; everything
// else is per-command.
let server = Server::builder()
    .socket_name("builder-example")
    .default_timeout(Duration::from_secs(5))
    .output_limits(OutputLimits::default().max_stdout_bytes(1024 * 1024))
    .dispatch_limits(DispatchLimits::default().max_in_flight(4))
    .build()?;

// Building does not start tmux, so this has not touched the machine yet.
let _ = server.identity();
```

## Members

- `output_limits` (method): Bound how many bytes one command may read from tmux.
- `dispatch_limits` (method): Bound how many commands may run at once.
- `control_client_limits` (method): Bound how many control-mode clients may remain attached.
- `socket_name` (method): Select a named tmux socket.
- `socket_path` (method): Select an explicit tmux socket path.
- `config_file` (method): Select a tmux configuration file.
- `colors` (method): Select tmux's 88- or 256-color compatibility mode.
- `tmux_executable` (method): Select the tmux executable without checking that it exists yet.
- `default_timeout` (method): Set the per-command dispatch deadline.
- `build` (method): Capture process context and construct an inert server handle.
