Struct subprocess::PopenConfig
[−]
[src]
pub struct PopenConfig { pub stdin: Redirection, pub stdout: Redirection, pub stderr: Redirection, pub detached: bool, pub executable: Option<OsString>, // some fields omitted }
Structure designed to be passed to Popen::create
.
Always create this structure using the Default
trait, such as
PopenConfig { field1: value1, field2: value2, ..Default::default() }
. This ensures that later additions to the
struct do not break existing code.
An alternative to using PopenConfig
is the Exec
struct which
provides a builder-style interface to the same functionality.
Fields
stdin: Redirection
How to configure the executed program's standard input.
stdout: Redirection
How to configure the executed program's standard output.
stderr: Redirection
How to configure the executed program's standard error.
detached: bool
Whether the Popen
instance is initially detached.
executable: Option<OsString>
Executable to run.
If this field is provided, this executable will be used to run
the program instead of argv[0]
, but argv[0]
will still be
provided as the program's argument list.
Methods
impl PopenConfig
[src]
fn try_clone(&self) -> IoResult<PopenConfig>
Clone the underlying PopenConfig
, or return an error.
This is guaranteed not to fail as long as no
Redirection::File
variant is used for one of the standard
streams. Otherwise, it fail if File::try_clone
fails on one
of the Redirection
values.
try_clone().unwrap()
is used to implement clone()
for the
builder structs Exec
and Pipeline
.
Trait Implementations
impl Debug for PopenConfig
[src]
impl Default for PopenConfig
[src]
fn default() -> PopenConfig
Returns the "default value" for a type. Read more