[][src]Struct portable_pty::cmdbuilder::CommandBuilder

pub struct CommandBuilder { /* fields omitted */ }

CommandBuilder is used to prepare a command to be spawned into a pty. The interface is intentionally similar to that of std::process::Command.

Methods

impl CommandBuilder[src]

pub fn new<S: AsRef<OsStr>>(program: S) -> Self[src]

Create a new builder instance with argv[0] set to the specified program.

pub fn new_default_prog() -> Self[src]

Create a new builder instance that will run some idea of a default program. Such a builder will panic if arg is called on it.

pub fn is_default_prog(&self) -> bool[src]

Returns true if this builder was created via new_default_prog

pub fn arg<S: AsRef<OsStr>>(&mut self, arg: S)[src]

Append an argument to the current command line. Will panic if called on a builder created via new_default_prog.

pub fn args<I, S>(&mut self, args: I) where
    I: IntoIterator<Item = S>,
    S: AsRef<OsStr>, 
[src]

Append a sequence of arguments to the current command line

pub fn env<K, V>(&mut self, key: K, val: V) where
    K: AsRef<OsStr>,
    V: AsRef<OsStr>, 
[src]

Override the value of an environmental variable

Trait Implementations

impl PartialEq<CommandBuilder> for CommandBuilder[src]

impl Debug for CommandBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]