AsyncStdCommand

Struct AsyncStdCommand 

Source
pub struct AsyncStdCommand { /* private fields */ }
Expand description

Async-std specific RuntimeCommand implementation.

Trait Implementations§

Source§

impl RuntimeCommand for AsyncStdCommand

Source§

type Runtime = AsyncStdGlobalRuntime

An async runtime.
Source§

fn new(program: impl AsRef<OsStr>) -> Self
where Self: Sized,

Constructs a new RuntimeCommand for launching the program at path program, with the following default configuration: Read more
Source§

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

Adds multiple arguments to pass to the program.
Source§

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

Inserts or updates multiple explicit environment variable mappings. Read more
Source§

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

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

Sets the working directory for the child process. Read more
Source§

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

Configuration for the child process’s standard output (stdout) handle. Read more
Source§

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>

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

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

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

Available on Unix only.
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 more
Source§

fn gid(&mut self, gid: u32) -> &mut Self

Available on Unix only.
Similar to uid, but sets the group ID of the child process. This has the same semantics as the uid field.
Source§

unsafe fn pre_exec( &mut self, f: impl FnMut() -> Result<()> + Send + Sync + 'static, ) -> &mut Self

Available on Unix only.
Schedules a closure to be run just before the exec function is invoked. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.