pub enum Error {
Io(Error),
UnsuccessfulTermination {
status: ExitStatus,
stdout: Vec<u8>,
stderr: Vec<u8>,
},
StdoutNotUtf8(FromUtf8Error),
StderrNotUtf8(FromUtf8Error),
}
Expand description
Represents the errors that can occur during command execution.
§Variants
UnsuccessfulTermination { status, stdout, stderr }
: /// -StdoutNotUtf8(std::string::FromUtf8Error)
: /// -StderrNotUtf8(std::string::FromUtf8Error)
: Indicates that thestderr
output could not be decoded as valid UTF-8.
Variants§
Io(Error)
Input/output error encountered during command execution.
UnsuccessfulTermination
Indicates that the command terminated unsuccessfully.
Includes the exit status, and the raw captured stdout
and stderr
output byte vectors.
Fields
§
status: ExitStatus
Command exit status.
StdoutNotUtf8(FromUtf8Error)
Indicates that the stdout
output could not be decoded as valid UTF-8.
StderrNotUtf8(FromUtf8Error)
Indicates that the stderr
output could not be decoded as valid UTF-8.
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)>
Returns the lower-level source of this error, if any. 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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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