# test.DaemonState

- **Module:** test
- **Package:** libtmux
- **Language:** Rust
- **Kind:** enum
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/test.rs#L657
- **Page:** https://libtmux.org/en/rs/latest/reference/test-daemonstate/

Whether a fixture's tmux daemon is still running, and how it ended if not.

A test drives tmux through tmux's own client, and that client reports a
daemon that died as an ordinary refusal: it prints `server exited
unexpectedly` and exits 1, the same shape as a command tmux rejected. An
assertion written against the reply alone therefore blames the command.
[`TestServer::daemon_state`] answers the question the reply cannot.

## Example

```rust
use libtmux::test::{DaemonState, TestServer};

let mut guard = TestServer::new().await?;
assert_eq!(guard.daemon_state(), DaemonState::Running);

guard.shutdown().await?;
```

## Members

- `Running` (constant): The daemon has not exited.
- `Gone` (constant): The daemon has exited, with the status the kernel reported.
- `Unreadable` (constant): The wait could not be made, so the daemon's fate is unknown.
- `is_running` (method): Whether the daemon has not exited.
