# error.ErrorKind

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

A coarse failure category for reporting and routing.

[`Error`] carries the recovery detail. One category can contain failures
with different retry scopes: overload and a bad argument are both refused,
while executor shutdown and a failed child pipe are both transport errors.
Use [`Error::is_transient`] before repeating a call unchanged.

New kinds may be added, so match with a `_` arm.

## Example

```rust
use libtmux::ErrorKind;

fn target_is_stale(kind: ErrorKind) -> bool {
    matches!(kind, ErrorKind::ObjectGone)
}

assert!(target_is_stale(ErrorKind::ObjectGone));
assert!(!target_is_stale(ErrorKind::InvalidInput));
```

## Members

- `PartialEffect` (constant): tmux accepted an effectful step before a later part of the operation failed.
- `ObjectGone` (constant): The object is not on the server. Look it up again, or create it.
- `Refused` (constant): The operation was refused before or by tmux.
- `ServerGone` (constant): No tmux server answered. Start one, or name the socket that has it.
- `Timeout` (constant): The operation did not finish in time.
- `Unreachable` (constant): tmux could not be run at all: not installed, or not where the server was told to look. Nothing about the request will change this.
- `UnsupportedVersion` (constant): The tmux that answered is older than this crate supports.
- `InvalidInput` (constant): The caller supplied inputs that cannot form a valid operation.
- `Transport` (constant): The process, connection, or executor carrying the command failed.
- `Decode` (constant): tmux answered in a shape the crate could not read. Worth reporting.
