Skip to main content

AnalyzerRunner

Trait AnalyzerRunner 

Source
pub trait AnalyzerRunner {
    // Required methods
    fn kind(&self) -> RunnerKind;
    fn isolation(&self) -> Isolation;
    fn run(
        &self,
        request: &AnalysisRequest,
    ) -> Result<AnalysisResponse, ExecError>;
}
Expand description

One analyzer backend.

Implementations differ only in where the analyzer ran; the request and the response are the same, so CI ingestion and a local sandboxed run are the same code path from a caller’s point of view. Every implementation must call check_request before doing any work, so the consent, network and worktree-access guarantees hold uniformly rather than per-backend.

Required Methods§

Source

fn kind(&self) -> RunnerKind

Which backend this is — recorded on every run it produces.

Source

fn isolation(&self) -> Isolation

The isolation boundary this backend actually provides. Recorded honestly: a backend with no boundary reports Isolation::None, never something stronger.

Source

fn run(&self, request: &AnalysisRequest) -> Result<AnalysisResponse, ExecError>

Execute the request.

§Errors

Returns ExecError if the request violates the shared contract (see check_request) or the backend cannot produce a usable result. A failed run yields no partial result: either a complete AnalysisResponse or an error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§