pub trait PackSolver: Send + Sync {
// Required methods
fn id(&self) -> &'static str;
fn solve(
&self,
spec: &ProblemSpec,
) -> Result<(Value, SolverReport), GateError>;
fn is_exact(&self) -> bool;
}Expand description
A solver within a pack
Each pack can have multiple solvers (e.g., greedy, exact, heuristic).
Required Methods§
Sourcefn solve(&self, spec: &ProblemSpec) -> Result<(Value, SolverReport), GateError>
fn solve(&self, spec: &ProblemSpec) -> Result<(Value, SolverReport), GateError>
Solve and produce plan payload + report
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".