pub struct Command {
pub module_path: CString,
pub args: Vec<CString>,
pub env: HashMap<CString, CString>,
}
Fields§
§module_path: CString
A path to the executable.
args: Vec<CString>
The arguments to pass.
env: HashMap<CString, CString>
The environment of the process.
Implementations§
source§impl Command
impl Command
sourcepub fn new<T>(module_path: T) -> Command
pub fn new<T>(module_path: T) -> Command
Constructs a new Command
for launching the executable at path module_path
with no
arguments and no environment by default. Builder methods are provided to change these
defaults and otherwise configure the process.
sourcepub fn arg<'a, T>(&'a mut self, arg: T) -> &'a mut Command
pub fn arg<'a, T>(&'a mut self, arg: T) -> &'a mut Command
Adds an argument to pass to the program.
sourcepub fn args<'a, T>(&'a mut self, args: &[T]) -> &'a mut Command
pub fn args<'a, T>(&'a mut self, args: &[T]) -> &'a mut Command
Adds multiple arguments to pass to the program.
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin 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