#[non_exhaustive]pub enum StreamError {
Spawn {
program: String,
source: Error,
},
PipeNotCaptured {
stream: &'static str,
},
CancelLockPoisoned,
}Expand description
Why spawn_streaming or
ProcessHandle::cancel failed.
Carries the real underlying std::io::Error as a source (via
std::error::Error::source) rather than a pre-formatted string, so a
caller can downcast or inspect the OS error (e.g. distinguish
NotFound — the binary isn’t on PATH — from PermissionDenied).
#[non_exhaustive] so adding a variant later isn’t a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Spawn
The child process could not be spawned: the binary isn’t on PATH,
isn’t executable, or the OS refused. source is the spawn io::Error
(commonly NotFound).
Fields
PipeNotCaptured
The spawned child didn’t expose a piped stdout/stderr. Shouldn’t
happen given the engine requests Stdio::piped(), but Child’s pipe
accessors return Option, so the case is represented rather than
unwrapped.
CancelLockPoisoned
Cancellation couldn’t acquire the child lock because it was poisoned (a thread panicked while holding it). The process may still be running; the caller can retry or give up.
Trait Implementations§
Source§impl Debug for StreamError
impl Debug for StreamError
Source§impl Display for StreamError
impl Display for StreamError
Source§impl Error for StreamError
impl Error for StreamError
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()