pub trait ProcessContext: Send + Sync {
// Required methods
fn run_command(
&self,
cmd: &str,
args: &[&str],
) -> Result<Vec<u8>, BntoError>;
fn temp_file(&self, suffix: &str) -> Result<PathBuf, BntoError>;
fn env_var(&self, key: &str) -> Option<String>;
fn work_dir(&self) -> Result<&Path, BntoError>;
}Expand description
System access boundary for processors that need external tools.
Required Methods§
Sourcefn run_command(&self, cmd: &str, args: &[&str]) -> Result<Vec<u8>, BntoError>
fn run_command(&self, cmd: &str, args: &[&str]) -> Result<Vec<u8>, BntoError>
Run an external command, capturing stdout.