pub trait CommandBuilder: Debug {
// Required methods
fn get_program(&self) -> &'static OsStr;
fn get_program_dir(&self) -> &Option<PathBuf>;
fn get_envs(&self) -> Vec<(OsString, OsString)>;
fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self;
// Provided methods
fn get_program_file(&self) -> PathBuf { ... }
fn get_args(&self) -> Vec<OsString> { ... }
fn build(self) -> Command
where Self: Sized { ... }
}
Expand description
Trait to build a command
Required Methods§
Sourcefn get_program(&self) -> &'static OsStr
fn get_program(&self) -> &'static OsStr
Get the program name
Sourcefn get_program_dir(&self) -> &Option<PathBuf>
fn get_program_dir(&self) -> &Option<PathBuf>
Location of the program binary
Provided Methods§
Sourcefn get_program_file(&self) -> PathBuf
fn get_program_file(&self) -> PathBuf
Fully qualified path to the program binary
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.