Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

error.Error

Rust
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
error
Package
libtmux
Source
crates/libtmux/src/error.rs
enum error.Error
enumoverload [source]
enumoverload [source]
enum 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.

Examples

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?;

Discussed in Errors and exceptions

47 declared, 0 inherited

Members

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

Type to search.