pub struct AsyncStdCommand { /* private fields */ }
Expand description
Async-std specific RuntimeCommand
implementation.
Trait Implementations§
Source§impl RuntimeCommand for AsyncStdCommand
impl RuntimeCommand for AsyncStdCommand
Source§type Runtime = AsyncStdGlobalRuntime
type Runtime = AsyncStdGlobalRuntime
An async runtime.
Source§fn new(program: impl AsRef<OsStr>) -> Selfwhere
Self: Sized,
fn new(program: impl AsRef<OsStr>) -> Selfwhere
Self: Sized,
Constructs a new
RuntimeCommand
for launching the program at
path program
, with the following default configuration: Read moreSource§fn arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Self
fn arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Self
Adds an argument to pass to the program.
Source§fn args(&mut self, args: impl Iterator<Item = impl AsRef<OsStr>>) -> &mut Self
fn args(&mut self, args: impl Iterator<Item = impl AsRef<OsStr>>) -> &mut Self
Adds multiple arguments to pass to the program.
Source§fn env(&mut self, key: impl AsRef<OsStr>, value: impl AsRef<OsStr>) -> &mut Self
fn env(&mut self, key: impl AsRef<OsStr>, value: impl AsRef<OsStr>) -> &mut Self
Inserts or updates an explicit environment variable mapping. Read more
Source§fn envs(
&mut self,
vars: impl Iterator<Item = (impl AsRef<OsStr>, impl AsRef<OsStr>)>,
) -> &mut Self
fn envs( &mut self, vars: impl Iterator<Item = (impl AsRef<OsStr>, impl AsRef<OsStr>)>, ) -> &mut Self
Inserts or updates multiple explicit environment variable mappings. Read more
Source§fn env_remove(&mut self, key: impl AsRef<OsStr>) -> &mut Self
fn env_remove(&mut self, key: impl AsRef<OsStr>) -> &mut Self
Removes an explicitly set environment variable and prevents inheriting it from a parent
process. Read more
Source§fn env_clear(&mut self) -> &mut Self
fn env_clear(&mut self) -> &mut Self
Clears all explicitly set environment variables and prevents inheriting any parent process
environment variables. Read more
Source§fn current_dir(&mut self, dir: impl AsRef<Path>) -> &mut Self
fn current_dir(&mut self, dir: impl AsRef<Path>) -> &mut Self
Sets the working directory for the child process. Read more
Source§fn stdin(&mut self, stdin: impl Into<Stdio>) -> &mut Self
fn stdin(&mut self, stdin: impl Into<Stdio>) -> &mut Self
Configuration for the child process’s standard input (stdin) handle. Read more
Source§fn stdout(&mut self, stdout: impl Into<Stdio>) -> &mut Self
fn stdout(&mut self, stdout: impl Into<Stdio>) -> &mut Self
Configuration for the child process’s standard output (stdout) handle. Read more
Source§fn stderr(&mut self, stderr: impl Into<Stdio>) -> &mut Self
fn stderr(&mut self, stderr: impl Into<Stdio>) -> &mut Self
Configuration for the child process’s standard error (stderr) handle. Read more
Source§fn spawn(&mut self) -> Result<<Self::Runtime as ProcessRuntime>::Child>
fn spawn(&mut self) -> Result<<Self::Runtime as ProcessRuntime>::Child>
Executes the command as a child process, returning a handle to it. Read more
Source§fn output(&mut self) -> impl Future<Output = Result<Output>> + Send
fn output(&mut self) -> impl Future<Output = Result<Output>> + Send
Executes the command as a child process, waiting for it to finish and
collecting all of its output. Read more
Source§fn status(&mut self) -> impl Future<Output = Result<ExitStatus>> + Send
fn status(&mut self) -> impl Future<Output = Result<ExitStatus>> + Send
Executes a command as a child process, waiting for it to finish and
collecting its status. Read more
Source§fn uid(&mut self, uid: u32) -> &mut Self
fn uid(&mut self, uid: u32) -> &mut Self
Sets the child process’s user ID. This translates to a
setuid
call in the child process. Failure in the setuid
call will cause the spawn to fail. Read moreAuto Trait Implementations§
impl Freeze for AsyncStdCommand
impl !RefUnwindSafe for AsyncStdCommand
impl Send for AsyncStdCommand
impl Sync for AsyncStdCommand
impl Unpin for AsyncStdCommand
impl !UnwindSafe for AsyncStdCommand
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