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

error.ErrorKind

Rust
  • Python 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.ErrorKind
enum [source]
enum [source]
enum 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.

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

10 declared, 0 inherited

Members

  • Decode constant tmux answered in a shape the crate could not read. Worth reporting.
  • InvalidInput constant The caller supplied inputs that cannot form a valid operation.
  • ObjectGone constant The object is not on the server. Look it up again, or create it.
  • PartialEffect constant tmux accepted an effectful step before a later part of the operation failed.
  • 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.
  • Transport constant The process, connection, or executor carrying the command failed.
  • 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.
Esc

Type to search.