[−][src]Struct gaol::sandbox::Command
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.
Methods
impl Command
[src]
pub fn new<T>(module_path: T) -> Command where
T: AsRef<OsStr>,
[src]
T: AsRef<OsStr>,
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.
pub fn me() -> Result<Command>
[src]
Constructs a new Command
for launching the current executable.
pub fn arg<'a, T>(&'a mut self, arg: T) -> &'a mut Command where
T: AsRef<OsStr>,
[src]
T: AsRef<OsStr>,
Adds an argument to pass to the program.
pub fn args<'a, T>(&'a mut self, args: &[T]) -> &'a mut Command where
T: AsRef<OsStr>,
[src]
T: AsRef<OsStr>,
Adds multiple arguments to pass to the program.
pub fn env<'a, T, U>(&'a mut self, key: T, val: U) -> &'a mut Command where
T: AsRef<OsStr>,
U: AsRef<OsStr>,
[src]
T: AsRef<OsStr>,
U: AsRef<OsStr>,
Inserts or updates an environment variable mapping.
pub fn spawn(&self) -> Result<Process>
[src]
Executes the command as a child process, which is returned.
Auto Trait Implementations
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
impl RefUnwindSafe for Command
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,