pub struct Command { /* private fields */ }Expand description
Wrapper around std::process::Command
Implementations§
Source§impl Command
impl Command
Sourcepub fn env_remove<K: AsRef<OsStr>>(&mut self, key: K) -> &mut Self
pub fn env_remove<K: AsRef<OsStr>>(&mut self, key: K) -> &mut Self
Sourcepub fn current_dir<P: AsRef<Path>>(&mut self, dir: P) -> &mut Self
pub fn current_dir<P: AsRef<Path>>(&mut self, dir: P) -> &mut Self
Sourcepub fn spawn(&mut self, pts: &Pts) -> Result<Child>
pub fn spawn(&mut self, pts: &Pts) -> Result<Child>
Executes the command as a child process via
std::process::Command::spawn on the given pty. The pty will be
attached to all of stdin, stdout, and stderr of the child,
unless those file descriptors were previously overridden through calls
to stdin, stdout, or
stderr. The newly created child process will also be
made the session leader of a new session, and will have the given
pty set as its controlling terminal.
§Errors
Returns an error if we fail to allocate new file descriptors for
attaching the pty to the child process, or if we fail to spawn the
child process (see the documentation for
std::process::Command::spawn), or if we fail to make the child a
session leader or set its controlling terminal.
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