# error.ServerGoneKind

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

Which way a tmux server was not there.

The four are one decision -- there is no server -- and four different
stories about how, which is the difference between a socket nobody has
started and a server that died under the command being run.

## Example

```rust
use libtmux::{Error, ServerGoneKind};

fn advise(error: &Error) -> &'static str {
    match error {
        Error::ServerGone { kind, .. } => match kind {
            ServerGoneKind::NotRunning => "start one",
            ServerGoneKind::Unreachable => "check the socket path",
            ServerGoneKind::Lost | ServerGoneKind::Stopped => "it went away mid-command",
            _ => "there is no server",
        },
        _ => "not a server problem",
    }
}

let absent = Error::ServerGone {
    command: "list-sessions",
    kind: ServerGoneKind::NotRunning,
};
assert_eq!(advise(&absent), "start one");
```

## Members

- `NotRunning` (constant): Nothing was listening on the socket.
- `Unreachable` (constant): The socket was there and the connection to it failed.
- `Lost` (constant): The connection was lost with the command in flight, which is a server that crashed or was killed.
- `Stopped` (constant): The server shut down with the command in flight.
