pub struct CommandExt { /* private fields */ }Expand description
Extends std::io::process::Command.
Implementations§
Source§impl CommandExt
impl CommandExt
Sourcepub fn new(cmd: &str) -> CommandExt
pub fn new(cmd: &str) -> CommandExt
Create a new CommandExt.
§Arguments
- cmd - The command to use, i.e. “echo”.
- exec - The Executable to use when executing the command.
Sourcepub fn wd(&mut self, wd: &Path) -> &mut CommandExt
pub fn wd(&mut self, wd: &Path) -> &mut CommandExt
Set the working directory for the command.
§Arguments
wd- The working directory for the command execution.
Sourcepub fn header(&mut self, show_header: bool) -> &mut CommandExt
pub fn header(&mut self, show_header: bool) -> &mut CommandExt
Set the header boolean.
§Arguments
- show_header - true, a header showing what will be executed is printed on stdout. Otherwise, no header is printed.
Sourcepub fn arg(&mut self, arg: &str) -> &mut CommandExt
pub fn arg(&mut self, arg: &str) -> &mut CommandExt
Sourcepub fn args(&mut self, args: &[&str]) -> &mut CommandExt
pub fn args(&mut self, args: &[&str]) -> &mut CommandExt
Auto Trait Implementations§
impl !Freeze for CommandExt
impl !RefUnwindSafe for CommandExt
impl Send for CommandExt
impl !Sync for CommandExt
impl Unpin for CommandExt
impl !UnwindSafe for CommandExt
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