pub trait Runner: Send + Sync {
// Required methods
fn command(&self) -> &CommandTemplate;
fn run(
&self,
invocation: &Invocation,
) -> Result<InvocationResult, RunnerError>;
// Provided method
fn capabilities(&self) -> RunnerCapabilities { ... }
}Expand description
Executes candidate invocations built by conformance cases.
Required Methods§
Sourcefn command(&self) -> &CommandTemplate
fn command(&self) -> &CommandTemplate
Returns the candidate command represented by this adapter.
Sourcefn run(&self, invocation: &Invocation) -> Result<InvocationResult, RunnerError>
fn run(&self, invocation: &Invocation) -> Result<InvocationResult, RunnerError>
Executes one invocation and returns its captured output.
§Errors
Returns RunnerError when the candidate cannot be launched or the
adapter cannot complete process I/O. A candidate closing piped stdin
before consuming every byte is normal completion, not an I/O failure.
Adapters must honor Invocation::capture_limit while continuing to
drain stdout and stderr.
Provided Methods§
Sourcefn capabilities(&self) -> RunnerCapabilities
fn capabilities(&self) -> RunnerCapabilities
Returns optional execution capabilities.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".