1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub trait Solver {
    type Rslt;

    /// Do solving work after stoping criteria verification.
    fn do_work_after(&mut self);

    /// Do solving work before stoping criteria verification.
    fn do_work_before(&mut self);

    fn initialize(&mut self) {}

    fn into_result(self) -> Self::Rslt;

    fn result(&self) -> &Self::Rslt;

    fn terminate(&mut self) {}
}