pub trait Analyzer: Send + Sync {
// Required methods
fn evaluate(&self, data: &DifferentialSet) -> SampleDecision;
fn oracle_class(&self) -> OracleClass;
// Provided method
fn analyze(&self, data: &DifferentialSet) -> OracleResult { ... }
}Expand description
Analyzes paired baseline/probe exchanges and produces an oracle verdict.
Implementors must be Send + Sync so they can be held in shared state across async tasks.
All methods take &self — analyzers are stateless with respect to individual probe runs.
Required Methods§
Sourcefn evaluate(&self, data: &DifferentialSet) -> SampleDecision
fn evaluate(&self, data: &DifferentialSet) -> SampleDecision
Incrementally evaluate a growing DifferentialSet.
Called after each new exchange pair is added. Returns NeedMore until enough samples
are collected to determine stability, then Complete with the final result.
Sourcefn oracle_class(&self) -> OracleClass
fn oracle_class(&self) -> OracleClass
The oracle class this analyzer handles.
Provided Methods§
Sourcefn analyze(&self, data: &DifferentialSet) -> OracleResult
fn analyze(&self, data: &DifferentialSet) -> OracleResult
Analyze a fully-collected DifferentialSet and return a verdict.
Provided method that delegates to evaluate. Exists for callers that
supply a complete set in one shot rather than driving the incremental sampling loop.
§Panics
Panics when evaluate returns NeedMore, meaning the supplied set has fewer samples
than this analyzer requires.