ServerConfigurationErrorKind
The category of an invalid crate::ServerBuilder configuration.
Source and package
- Qualified name
-
libtmux::error:: Server Configuration Error Kind - Module
- error
- Package
- libtmux
- Source
- crates/libtmux/src/error.rs
-
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#
| Case | Payload | Description |
|---|---|---|
| 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. |