Struct command_error::WaitError
source · pub struct WaitError { /* private fields */ }
Expand description
An error from failing to wait for a command. Produced by ChildExt
.
let mut command = Command::new("echo");
command.arg("puppy doggy");
let displayed: Utf8ProgramAndArgs = (&command).into();
let error = WaitError::new(
Box::new(displayed),
std::io::Error::new(
std::io::ErrorKind::NotFound,
"File not found (os error 2)"
),
);
assert_eq!(
error.to_string(),
"Failed to wait for `echo`: File not found (os error 2)"
);
Implementations§
Trait Implementations§
source§impl Error for WaitError
impl Error for WaitError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 WaitError
impl !RefUnwindSafe for WaitError
impl Send for WaitError
impl Sync for WaitError
impl Unpin for WaitError
impl !UnwindSafe for WaitError
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