Struct command_error::TryWaitContext
source · pub struct TryWaitContext { /* private fields */ }
Expand description
An optional ExitStatus
combined with context about the Command
that produced it.
See also: OutputContext
.
Implementations§
source§impl TryWaitContext
impl TryWaitContext
sourcepub fn status(&self) -> Option<ExitStatus>
pub fn status(&self) -> Option<ExitStatus>
Get the result of the Child::try_wait
call.
sourcepub fn command(&self) -> &(dyn CommandDisplay + Send + Sync)
pub fn command(&self) -> &(dyn CommandDisplay + Send + Sync)
Get a reference to the command contained in this context object, for use in error messages or diagnostics.
sourcepub fn into_command(self) -> Box<dyn CommandDisplay + Send + Sync>
pub fn into_command(self) -> Box<dyn CommandDisplay + Send + Sync>
Get the command contained in this context object, for use in error messages or diagnostics.
sourcepub fn into_output_context(self) -> Option<OutputContext<ExitStatus>>
pub fn into_output_context(self) -> Option<OutputContext<ExitStatus>>
If the ExitStatus
is present, get an OutputContext
for constructing error messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TryWaitContext
impl !RefUnwindSafe for TryWaitContext
impl Send for TryWaitContext
impl Sync for TryWaitContext
impl Unpin for TryWaitContext
impl !UnwindSafe for TryWaitContext
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