Skip to main content

CommandRunner

Trait CommandRunner 

Source
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§

Source

fn run(&self, bin: &str, args: &[&str]) -> Option<String>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§