Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

enum libtmux-rs latest

ServerConfigurationErrorKind

The category of an invalid crate::ServerBuilder configuration.

Source and package
Qualified name
libtmux::error::ServerConfigurationErrorKind
Module
error
Package
libtmux
Source
crates/libtmux/src/error.rs
enum error.ServerConfigurationErrorKind

Description#

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

Variants9#

ServerConfigurationErrorKind variants
CasePayloadDescription
ConflictingSocketSelectors No payload A socket name and an explicit socket path were both configured.
InvalidColorMode No payload The requested color override was not 256 colors.
InvalidConfigPath No payload A config path was empty or contained a NUL byte.
InvalidSocketName No payload A socket name was not one non-empty path component.
InvalidSocketPath No payload An explicit socket path was empty or contained a NUL byte.
MalformedTmuxVariable No payload The TMUX variable is present but is not tmux's triple.
NotInsideTmux No payload There is no TMUX variable, so this process is not inside tmux.
SocketRootUnavailable No payload A stable socket root could not be captured.
WorkingDirectoryUnavailable No payload The process working directory could not be captured.
Esc

Type to search.

Reference previewOpen reference