ErrorKind
A coarse failure category for reporting and routing.
Source and package
- Qualified name
-
libtmux::error:: Error Kind - Module
- error
- Package
- libtmux
- Source
- crates/libtmux/src/error.rs
-
Description#
Errorcarries 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. UseError::is_transient()before repeating a call unchanged.New kinds may be added, so match with a
_arm.Examples#
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));
Variants10#
| Case | Payload | Description |
|---|---|---|
| Decode | No payload | tmux answered in a shape the crate could not read. Worth reporting. |
| InvalidInput | No payload | The caller supplied inputs that cannot form a valid operation. |
| ObjectGone | No payload | The object is not on the server. Look it up again, or create it. |
| PartialEffect | No payload | tmux accepted an effectful step before a later part of the operation failed. |
| Refused | No payload | The operation was refused before or by tmux. |
| ServerGone | No payload | No tmux server answered. Start one, or name the socket that has it. |
| Timeout | No payload | The operation did not finish in time. |
| Transport | No payload | The process, connection, or executor carrying the command failed. |
| Unreachable | No payload | 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 | No payload | The tmux that answered is older than this crate supports. |