[−][src]Struct portable_pty::cmdbuilder::CommandBuilder
CommandBuilder
is used to prepare a command to be spawned into a pty.
The interface is intentionally similar to that of std::process::Command
.
Implementations
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 from_argv(args: Vec<OsString>) -> Self
[src]
Create a new builder instance from a pre-built argument vector
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]
I: IntoIterator<Item = S>,
S: AsRef<OsStr>,
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]
K: AsRef<OsStr>,
V: AsRef<OsStr>,
Override the value of an environmental variable
pub fn cwd<D>(&mut self, dir: D) where
D: AsRef<OsStr>,
[src]
D: AsRef<OsStr>,
Trait Implementations
impl Debug for CommandBuilder
[src]
impl PartialEq<CommandBuilder> for CommandBuilder
[src]
fn eq(&self, other: &CommandBuilder) -> bool
[src]
fn ne(&self, other: &CommandBuilder) -> bool
[src]
impl StructuralPartialEq for CommandBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for CommandBuilder
impl Send for CommandBuilder
impl Sync for CommandBuilder
impl Unpin for CommandBuilder
impl UnwindSafe for CommandBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,