pub trait LanguageAdapter: Send + Sync {
// Required methods
fn language(&self) -> CodingLanguage;
fn diagnostic_sensor(&self) -> SensorRef;
fn parse_diagnostics(
&self,
node_id: &str,
generation: u32,
raw: &str,
) -> Vec<ResidualEvent>;
fn correction_for(
&self,
residual: &ResidualEvent,
) -> Option<CorrectionDirection>;
// Provided methods
fn smoke_invocations(&self, _workspace: &Path) -> Vec<SmokeInvocation> { ... }
fn classify_runtime(
&self,
node_id: &str,
generation: u32,
invocation: &SmokeInvocation,
exit_success: bool,
output: &str,
) -> Vec<ResidualEvent> { ... }
}Expand description
A coding language adapter: a verifier-suite provider for one language.
Required Methods§
fn language(&self) -> CodingLanguage
Sourcefn diagnostic_sensor(&self) -> SensorRef
fn diagnostic_sensor(&self) -> SensorRef
The primary diagnostic sensor for this language.
Sourcefn parse_diagnostics(
&self,
node_id: &str,
generation: u32,
raw: &str,
) -> Vec<ResidualEvent>
fn parse_diagnostics( &self, node_id: &str, generation: u32, raw: &str, ) -> Vec<ResidualEvent>
Parse raw diagnostic output into typed residuals.
Sourcefn correction_for(
&self,
residual: &ResidualEvent,
) -> Option<CorrectionDirection>
fn correction_for( &self, residual: &ResidualEvent, ) -> Option<CorrectionDirection>
Map a residual to a correction direction, or None when there is none.
Provided Methods§
Sourcefn smoke_invocations(&self, _workspace: &Path) -> Vec<SmokeInvocation>
fn smoke_invocations(&self, _workspace: &Path) -> Vec<SmokeInvocation>
Runtime smoke invocations to exercise the built artifact’s entrypoints
(PSP-8 runtime probe). Default: none — a new adapter opts in by overriding
this. The runtime executes the returned commands from workspace.
Sourcefn classify_runtime(
&self,
node_id: &str,
generation: u32,
invocation: &SmokeInvocation,
exit_success: bool,
output: &str,
) -> Vec<ResidualEvent>
fn classify_runtime( &self, node_id: &str, generation: u32, invocation: &SmokeInvocation, exit_success: bool, output: &str, ) -> Vec<ResidualEvent>
Classify the output of a smoke invocation into Runtime residuals.
Default: shared crash-marker + non-zero-exit detection.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".