pub enum CmdError {
CmdFailure {
cmd: Cmd,
stderr: String,
stdout: String,
status: ExitStatus,
},
Io {
cmd: Cmd,
source: Error,
},
Utf8 {
cmd: Cmd,
source: Utf8Error,
},
FromUtf8 {
cmd: Cmd,
source: FromUtf8Error,
},
}Expand description
Command execution errors with contextual details.
Each variant embeds Cmd (program, args, cwd) for terse diagnostics. Utf8
is currently not produced by CmdExt::exec but kept for potential future APIs.
Variants§
CmdFailure
Non-zero exit status; stderr captured & UTF-8 decoded.
Fields
§
status: ExitStatusFailing status.
Io
I/O failure spawning or waiting.
Utf8
Borrowed data UTF-8 validation failed.
FromUtf8
Owned stderr bytes not valid UTF-8.
Trait Implementations§
Source§impl Error for CmdError
impl Error for CmdError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
Source§fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
🔬This is a nightly-only experimental API. (
error_generic_member_access)Provides type-based access to context intended for error reports. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CmdError
impl !RefUnwindSafe for CmdError
impl Send for CmdError
impl Sync for CmdError
impl Unpin for CmdError
impl UnsafeUnpin for CmdError
impl !UnwindSafe for CmdError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more