pub struct Command(/* private fields */);Implementations§
Source§impl Command
impl Command
pub fn new(program: impl AsRef<OsStr>) -> Self
pub fn arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Self
pub fn args<I, S>(&mut self, args: I) -> &mut Self
pub fn get_args(&self) -> impl Iterator<Item = &OsStr>
pub fn env( &mut self, key: impl AsRef<OsStr>, val: impl AsRef<OsStr>, ) -> &mut Self
pub fn envs<I, K, V>(&mut self, vars: I) -> &mut Self
pub fn env_remove(&mut self, key: impl AsRef<OsStr>) -> &mut Self
pub fn env_clear(&mut self) -> &mut Self
pub fn current_dir(&mut self, dir: impl AsRef<Path>) -> &mut Self
pub fn stdin(&mut self, cfg: impl Into<Stdio>) -> &mut Self
pub fn stdout(&mut self, cfg: impl Into<Stdio>) -> &mut Self
pub fn stderr(&mut self, cfg: impl Into<Stdio>) -> &mut Self
pub fn kill_on_drop(&mut self, kill_on_drop: bool) -> &mut Self
pub fn spawn(&mut self) -> Result<Child>
pub async fn output(&mut self) -> Result<Output>
pub async fn status(&mut self) -> Result<ExitStatus>
pub fn get_program(&self) -> &OsStr
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl !RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more