Trait CommandExt

Source
pub trait CommandExt: AsRef<Command> + AsMut<Command> {
    // Provided methods
    fn arg(&mut self, s: impl AsRef<OsStr>) -> &mut Self { ... }
    fn args<I, S>(&mut self, args: I) -> &mut Self
       where I: IntoIterator<Item = S>,
             S: AsRef<OsStr> { ... }
    fn optional<T>(
        &mut self,
        option: &Option<T>,
        op: impl FnOnce(&mut Self, &T),
    ) -> &mut Self { ... }
    fn conditional(
        &mut self,
        condition: bool,
        op: impl FnOnce(&mut Self),
    ) -> &mut Self { ... }
    fn option(&mut self, option: Option<impl AsRef<OsStr>>) -> &mut Self { ... }
    fn current_dir(&mut self, dir: impl AsRef<Path>) -> &mut Self { ... }
    fn env(
        &mut self,
        key: impl AsRef<OsStr>,
        val: impl AsRef<OsStr>,
    ) -> &mut Self { ... }
    fn status(&mut self) -> ExitStatus { ... }
    fn info(&self) -> OsString { ... }
    fn invoke(&mut self) { ... }
    fn output(&mut self) -> Output { ... }
}

Provided Methods§

Source

fn arg(&mut self, s: impl AsRef<OsStr>) -> &mut Self

Source

fn args<I, S>(&mut self, args: I) -> &mut Self
where I: IntoIterator<Item = S>, S: AsRef<OsStr>,

Source

fn optional<T>( &mut self, option: &Option<T>, op: impl FnOnce(&mut Self, &T), ) -> &mut Self

Source

fn conditional( &mut self, condition: bool, op: impl FnOnce(&mut Self), ) -> &mut Self

Source

fn option(&mut self, option: Option<impl AsRef<OsStr>>) -> &mut Self

Source

fn current_dir(&mut self, dir: impl AsRef<Path>) -> &mut Self

Source

fn env(&mut self, key: impl AsRef<OsStr>, val: impl AsRef<OsStr>) -> &mut Self

Source

fn status(&mut self) -> ExitStatus

Source

fn info(&self) -> OsString

Source

fn invoke(&mut self)

Source

fn output(&mut self) -> Output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§