pub struct Command { /* private fields */ }Expand description
A program run for the duration of a test run.
Implementations§
Source§impl Command
impl Command
pub fn new(name: &str, program: &str) -> Self
pub fn arg(self, arg: &str) -> Self
pub fn args<I: IntoIterator<Item = S>, S: AsRef<str>>(self, args: I) -> Self
Sourcepub fn dir(self, dir: impl Into<PathBuf>) -> Self
pub fn dir(self, dir: impl Into<PathBuf>) -> Self
Runs in this directory (a program that keeps its files where it runs).
pub fn env(self, key: &str, value: &str) -> Self
pub fn ready(self, ready: Ready) -> Self
Sourcepub fn hint(self, hint: &str) -> Self
pub fn hint(self, hint: &str) -> Self
What to say when the program is not there: how to get it.
Sourcepub fn working_dir(&self) -> Option<&Path>
pub fn working_dir(&self) -> Option<&Path>
The directory it runs in, if it has one of its own.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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