pub enum ExecutorError {
UnsupportedOption(&'static str),
MissingProgram(OsString),
SpawnFailure(Error),
Failure(SysexitsError, Option<String>),
UnexpectedFailure(Option<i32>, Option<String>),
UnexpectedOther(Error),
IncompleteInput,
}std only.Expand description
A configuration failure, or a failure to launch, communicate with, or complete a child process.
Conversion from a process output decodes stderr strictly as UTF-8: invalid
UTF-8 yields None, while empty stderr yields Some(String::new()).
Conversion from an exit status alone has no stderr and always uses None.
Variants§
UnsupportedOption(&'static str)
Supplied capability metadata declares a requested option unsupported.
Contains the long option name (such as --sort); no child was spawned.
MissingProgram(OsString)
Spawning returned NotFound; contains the selected program name or path.
SpawnFailure(Error)
The process could not be started for a reason other than NotFound.
Failure(SysexitsError, Option<String>)
A recognized sysexits error and optional captured UTF-8 stderr.
UnexpectedFailure(Option<i32>, Option<String>)
An unrecognized exit code and optional captured UTF-8 stderr.
The code is None when termination has no numeric exit code, such as
termination by a signal on Unix.
UnexpectedOther(Error)
An I/O failure outside spawning, such as copying stdin, waiting for the child, or decoding a prompter’s stdout as UTF-8.
IncompleteInput
The child exited successfully before its input feed completed. Use
crate::ExecutionCompletion to explicitly handle intentional early exit.
Trait Implementations§
Source§impl Debug for ExecutorError
impl Debug for ExecutorError
Source§impl Display for ExecutorError
impl Display for ExecutorError
Source§impl Error for ExecutorError
impl Error for ExecutorError
1.30.0 · 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()