# Server.snapshot()

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/Server.swift#L283
- **Page:** https://libtmux.org/en/swift/latest/reference/server-snapshot()/

```
Server.snapshot()() -> Snapshot
```

Reads every object from one daemon incarnation.

The listings are separate tmux commands, so the server's identity is
read before and after them. If a daemon died and a replacement bound the
same socket in between, this throws ``TmuxError/serverRestarted``.
Another client can still mutate the same daemon between listings.

## Raises

- `TmuxError`
