Struct cargo_util::ProcessError
source · [−]pub struct ProcessError {
pub desc: String,
pub code: Option<i32>,
pub stdout: Option<Vec<u8>>,
pub stderr: Option<Vec<u8>>,
}
Fields
desc: String
A detailed description to show to the user why the process failed.
code: Option<i32>
The exit status of the process.
This can be None
if the process failed to launch (like process not
found) or if the exit status wasn’t a code but was instead something
like termination via a signal.
stdout: Option<Vec<u8>>
The stdout from the process.
This can be None
if the process failed to launch, or the output was
not captured.
stderr: Option<Vec<u8>>
The stderr from the process.
This can be None
if the process failed to launch, or the output was
not captured.
Implementations
sourceimpl ProcessError
impl ProcessError
sourcepub fn new(
msg: &str,
status: Option<ExitStatus>,
output: Option<&Output>
) -> ProcessError
pub fn new(
msg: &str,
status: Option<ExitStatus>,
output: Option<&Output>
) -> ProcessError
Creates a new ProcessError
.
status
can beNone
if the process did not launch.output
can beNone
if the process did not launch, or output was not captured.
Trait Implementations
sourceimpl Debug for ProcessError
impl Debug for ProcessError
sourceimpl Display for ProcessError
impl Display for ProcessError
sourceimpl Error for ProcessError
impl Error for ProcessError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations
impl RefUnwindSafe for ProcessError
impl Send for ProcessError
impl Sync for ProcessError
impl Unpin for ProcessError
impl UnwindSafe for ProcessError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more