pub trait ProbeHost {
// Required methods
fn os(&self) -> String;
fn arch(&self) -> String;
fn which(&self, tool: &str) -> Option<PathBuf>;
fn run(&self, tool: &str, args: &[&str]) -> Option<String>;
fn run_all(&self, tool: &str, args: &[&str]) -> Option<String>;
fn read_file(&self, path: &str) -> Option<String>;
fn list_dir(&self, path: &str) -> Option<Vec<String>>;
fn exists(&self, path: &str) -> bool;
}Expand description
What probes may ask of the machine.
Required Methods§
Sourcefn which(&self, tool: &str) -> Option<PathBuf>
fn which(&self, tool: &str) -> Option<PathBuf>
Resolve a tool name to an executable path, if installed.
Sourcefn run(&self, tool: &str, args: &[&str]) -> Option<String>
fn run(&self, tool: &str, args: &[&str]) -> Option<String>
Run a tool (resolved with Self::which) and return stdout when it
exits 0 within the timeout.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".