#[non_exhaustive]pub enum Error {
Show 17 variants
ExecutableNotFound {
executable: PathBuf,
},
Io {
operation: &'static str,
source: Error,
},
Timeout {
summary: CommandSummary,
timeout: Duration,
},
CommandFailed {
operation: &'static str,
result: Box<CommandResult>,
},
ServerUnavailable {
message: String,
},
ObjectNotFound {
kind: ObjectKind,
target: String,
},
MultipleObjects {
kind: ObjectKind,
count: usize,
query: String,
},
InvalidId {
kind: &'static str,
value: String,
},
InvalidSessionName(String),
InvalidArgument {
argument: &'static str,
message: String,
},
InvalidVersion(String),
Unsupported {
capability: &'static str,
required: ReleaseVersion,
found: TmuxVersion,
},
Decode {
context: &'static str,
message: String,
},
Option {
kind: OptionErrorKind,
message: String,
},
NotInsideTmux,
WaitTimeout {
condition: String,
},
Cleanup {
operation: &'static str,
source: Box<Error>,
},
}Expand description
A non-exhaustive error produced by configuration, execution, or parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ExecutableNotFound
The configured tmux executable was not found.
Io
A process or file operation failed.
Fields
Timeout
A command exceeded the configured timeout.
Fields
summary: CommandSummaryThe redacted command description.
CommandFailed
tmux returned a non-zero status for a typed operation.
Fields
result: Box<CommandResult>The complete byte-preserving result.
No tmux server was available on the requested socket.
ObjectNotFound
A requested tmux object did not exist.
MultipleObjects
A lookup that expected one object returned multiple objects.
Fields
kind: ObjectKindThe object kind.
InvalidId
An ID did not use the required prefix and numeric suffix.
InvalidSessionName(String)
A session name used tmux-reserved target punctuation.
InvalidArgument
A public argument did not satisfy its contract.
InvalidVersion(String)
tmux returned an unrecognized version.
Unsupported
The connected tmux version lacks a requested capability.
Fields
required: ReleaseVersionThe minimum release.
found: TmuxVersionThe actual connected version.
Decode
Structured tmux output could not be decoded.
Fields
Option
An option value or index was invalid.
NotInsideTmux
An operation required being inside an attached tmux client.
WaitTimeout
A wait condition expired before it was satisfied.
Cleanup
The main operation succeeded but deterministic cleanup failed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()