# Server.snapshot()

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Server.swift#L257
- **Page:** https://libtmux.org/reference/swift/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`
