pub enum SpawnError {
NotStarted,
NoPipe {
stream: &'static str,
},
}Expand description
Why a child could not be started.
Variants§
NotStarted
The program could not be started.
Carries no io::Error, for the reason StdioError does: the caller
in a position to tell “no such file” from “not executable” is the one
that has already failed to spawn, and it can report the program’s own
refusal. A String here would put a path this process invented onto
the error path of every caller above it.
NoPipe
The child started, but the platform did not give it one of the three pipes.
Not a failure the spawn can detect — Stdio::piped() succeeding and
the handle coming back without the stream is not a thing that happens —
and reported because the alternative on the only path that can observe
it is an unwrap, and an unwrap on a path that runs for every client
a caller ever spawns is a panic waiting for a platform nobody tested.
Trait Implementations§
Source§impl Clone for SpawnError
impl Clone for SpawnError
impl Copy for SpawnError
Source§impl Debug for SpawnError
impl Debug for SpawnError
Source§impl Display for SpawnError
impl Display for SpawnError
impl Eq for SpawnError
Source§impl Error for SpawnError
impl Error for SpawnError
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()