pub trait DeclaredCommandWorld {
// Required methods
fn close_standard_input(&mut self);
fn clear_environment(&mut self);
fn set_variable(&mut self, name: &OsStr, value: &OsStr);
}Expand description
A process builder that can be placed in the declared-command world.
Implemented for both process builders this workspace spawns declared
commands with — std::process::Command for the synchronous CLI runner and
tokio::process::Command for the activity executors — so
place_in_declared_world is one function rather than one per builder.
The trait carries only what the world is made of; nothing here can express
a working directory or an argument, which is what stops it growing into a
second command builder.
Required Methods§
Sourcefn close_standard_input(&mut self)
fn close_standard_input(&mut self)
Close standard input: the child reads end-of-file immediately.
Sourcefn clear_environment(&mut self)
fn clear_environment(&mut self)
Remove every variable the host holds.
Sourcefn set_variable(&mut self, name: &OsStr, value: &OsStr)
fn set_variable(&mut self, name: &OsStr, value: &OsStr)
Bind name to value, replacing any binding of that name already set.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".