pub struct SpawnPlan {
pub program: OsString,
pub args: Vec<OsString>,
pub env: Vec<(OsString, OsString)>,
pub cwd: PathBuf,
}Expand description
Description of one process the executor wants to spawn.
Carries the program, its argument vector, the working directory
(always absolute), and the environment variables the child should
see. The Self::env vector is preserved verbatim by all
implementations so test assertions are deterministic.
Fields§
§program: OsStringThe executable to launch. May be an absolute path
(e.g. /bin/sh) or a name to be resolved via PATH
(e.g. echo).
args: Vec<OsString>The argument vector passed to the child. Does NOT include
argv[0]; implementations supply that from Self::program.
env: Vec<(OsString, OsString)>Environment variables the child receives. Order is preserved;
when the same name appears twice, last-write-wins (matching
std::process::Command::env semantics).
cwd: PathBufWorking directory the child runs in. MUST be absolute.
Trait Implementations§
impl Eq for SpawnPlan
impl StructuralPartialEq for SpawnPlan
Auto Trait Implementations§
impl Freeze for SpawnPlan
impl RefUnwindSafe for SpawnPlan
impl Send for SpawnPlan
impl Sync for SpawnPlan
impl Unpin for SpawnPlan
impl UnsafeUnpin for SpawnPlan
impl UnwindSafe for SpawnPlan
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