pub trait CommandRunner: Send + Sync {
// Required method
fn run(&self, bin: &str, args: &[&str]) -> Option<String>;
}Expand description
Run an external binary with the given args and return its stdout, trimmed, when the spawn succeeded AND the process exited with a success status AND stdout is non-empty after trimming.
Returns None for any of: spawn failure (binary not on PATH),
non-zero exit status, empty stdout after trim. Stderr is
captured and discarded — the crawlers treat all failures as
“no information”, not as errors to surface.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".