# error.Error

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

An error returned by libtmux.

Request-bearing variants expose a Core-scoped dispatch-request identity.
The Core allocates it before validation, so an error may carry an identity
even when no process was spawned. Clones of one [`crate::Server`] share the
allocating Core; independently constructed servers do not share its scope.
The identity is not globally unique, a process ID, an internal attempt ID,
or a control-mode protocol-block ID.

## Example

```rust
use libtmux::ErrorKind;

let guard = libtmux::test::TestServer::new().await?;
let doomed = guard.server().new_session("doomed").await?;
let mut stale = doomed.clone();
guard.server().new_session("survivor").await?;
doomed.kill().await?;

// A handle outliving its object is the normal way this fails, so
// `is_object_gone` is the branch most callers write.
let failure = stale.rename("renamed").await.expect_err("the session is gone");
assert!(failure.is_object_gone());
assert_eq!(failure.kind(), ErrorKind::ObjectGone);

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

## Members

- `AfterEffect` (constant): tmux accepted an effectful step before a later part of the operation failed.
- `InvalidServerConfiguration` (constant): A server builder value was invalid.
- `InvalidVersionOutput` (constant): The output from `tmux -V` did not match a supported shape.
- `UnsupportedTmuxVersion` (constant): The detected tmux version does not meet the supported floor.
- `OptionRejected` (constant): tmux would not accept an option name or value.
- `OptionScopeMismatch` (constant): The handle's scope is not one tmux keeps this option in.
- `OptionValueRefused` (constant): A typed option write that tmux's option table refuses, so nothing was sent.
- `UnreadableFormatValue` (constant): tmux answered a format query with a value this crate cannot read.
- `ServerGenerationChanged` (constant): A different tmux daemon now holds this endpoint.
- `OutputLimitExceeded` (constant): tmux produced more output than the dispatch was allowed to read.
- `Overloaded` (constant): The server is already running as much work of this kind as it admits.
- `ControlModeFrameTooLarge` (constant): A control-mode frame grew past what the connection admits.
- `SessionExists` (constant): A session of this name already exists.
- `UnsupportedCapability` (constant): The running tmux is too old for a capability the caller asked for.
- `CapabilityDefective` (constant): tmux has this capability and the running release gets it wrong.
- `VersionProbeFailed` (constant): The version probe process returned a non-zero status.
- `InvalidCommandInput` (constant): A command or executable contained a byte that cannot be passed to a process.
- `ServerMismatch` (constant): Handles passed to one operation belong to different tmux endpoints.
- `UnrecognizedLayout` (constant): A saved layout value is not a preset name, a classic layout string, or a JSON layout.
- `AmbiguousLayout` (constant): A saved layout value is a preset prefix that names more than one preset on the running tmux release.
- `InvalidPlan` (constant): A plan has a dependency that cannot be resolved before dispatch.
- `ExecutableNotFound` (constant): The configured tmux executable was not found.
- `Spawn` (constant): The tmux process could not be started.
- `ReadOutput` (constant): A captured output stream could not be drained.
- `WaitChild` (constant): The direct tmux child could not be awaited.
- `Timeout` (constant): A tmux request exceeded its configured deadline.
- `ExecutorShutdown` (constant): The executor has stopped accepting requests.
- `DuplicateRequest` (constant): A Core-scoped dispatch-request identity is already active in this executor.
- `SupervisorLost` (constant): The independent supervisor ended unexpectedly after cleaning up its child.
- `ObjectGone` (constant): A refresh could not find the object it was asked to update.
- `LinkGone` (constant): A target found nothing, which does not prove the object is gone.
- `ClientSuspended` (constant): A client is stopped rather than gone, so listings leave it out.
- `ControlMode` (constant): A control-mode connection failed.
- `RuntimeUnavailable` (constant): A blocking runtime could not be created.
- `RuntimeNested` (constant): A blocking runtime was driven from inside another runtime.
- `ServerGone` (constant): The tmux server the command needed was not there.
- `CommandFailed` (constant): tmux rejected a command that the crate requires to succeed.
- `NoEffect` (constant): A creating command exited 0 without creating anything.
- `DecodeListing` (constant): tmux listing output could not be decoded into typed snapshots.
- `UnreadableAccessRule` (constant): A `server-access -l` line matched neither grammar tmux is known to print.
- `invalid_version_output_len` (method): Return the length of the invalid `tmux -V` output, when present.
- `found_version` (method): Return the detected version for a minimum-version error.
- `minimum_version` (method): Return the required release for a minimum-version error.
- `after_effect` (method): Mark this failure as following an effect that tmux accepted.
- `kind` (method): Return what this failure means for the caller.
- `is_object_gone` (method): Report whether tmux no longer has the object the call named.
- `is_transient` (method): Report whether retrying the same call unchanged is safe and may succeed.
