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

error.ServerConfigurationErrorKind

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.ServerConfigurationErrorKind
enum [source]
enum [source]
enum error.ServerConfigurationErrorKind

The category of an invalid crate::ServerBuilder configuration.

Rejected path and environment bytes are never retained by this value.

Examples

use libtmux::{Error, ServerConfigurationErrorKind};
// A socket name and a socket path are two ways to say the same thing, and
// tmux has no rule for which wins, so the builder refuses rather than picks.
let failure = libtmux::Server::builder()
.socket_name("named")
.socket_path("/tmp/libtmux-rs-dev/explicit")
.build()
.expect_err("two socket selectors");
assert!(matches!(
failure,
Error::InvalidServerConfiguration {
kind: ServerConfigurationErrorKind::ConflictingSocketSelectors,
..
},
));
// The rejected bytes are not carried in the error, so logging it cannot
// disclose a path.
assert!(!failure.to_string().contains("/tmp/"));

9 declared, 0 inherited

Members

Esc

Type to search.