Trait splr::types::Instantiate
source · pub trait Instantiate {
// Required method
fn instantiate(conf: &Config, cnf: &CNFDescription) -> Self;
// Provided method
fn handle(&mut self, _e: SolverEvent) { ... }
}
Expand description
API for object instantiation based on Configuration
and CNFDescription
.
This is implemented by all the Splr modules except Configuration
and CNFDescription
.
§Example
use crate::{splr::config::Config, splr::types::*};
use splr::{cdb::ClauseDB, solver::Solver};
let _ = ClauseDB::instantiate(&Config::default(), &CNFDescription::default());
let _ = Solver::instantiate(&Config::default(), &CNFDescription::default());
Required Methods§
sourcefn instantiate(conf: &Config, cnf: &CNFDescription) -> Self
fn instantiate(conf: &Config, cnf: &CNFDescription) -> Self
make and return an object from Config
and CNFDescription
.
Provided Methods§
sourcefn handle(&mut self, _e: SolverEvent)
fn handle(&mut self, _e: SolverEvent)
update by a solver event.
Object Safety§
This trait is not object safe.