1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
pub trait Solver { type Rslt; /// Do solving work after stoping criteria verification. fn after_iter(&mut self); /// Do solving work before stoping criteria verification. fn before_iter(&mut self); fn finished(&mut self) {} fn init(&mut self) {} fn into_result(self) -> Self::Rslt; fn result(&self) -> &Self::Rslt; fn result_mut(&mut self) -> &mut Self::Rslt; }