Skip to main content

MaybeTermination

Trait MaybeTermination 

Source
pub trait MaybeTermination<S: PlanningSolution, D: Director<S>, BestCb: BestSolutionCallback<S> = ()>: Send {
    // Required method
    fn should_terminate(
        &self,
        solver_scope: &SolverScope<'_, S, D, BestCb>,
    ) -> bool;

    // Provided method
    fn install_inphase_limits(
        &self,
        _solver_scope: &mut SolverScope<'_, S, D, BestCb>,
    ) { ... }
}
Expand description

Marker trait for termination types that can be used in Solver.

Required Methods§

Source

fn should_terminate(&self, solver_scope: &SolverScope<'_, S, D, BestCb>) -> bool

Provided Methods§

Source

fn install_inphase_limits( &self, _solver_scope: &mut SolverScope<'_, S, D, BestCb>, )

Implementations on Foreign Types§

Source§

impl<S, D, BestCb, T> MaybeTermination<S, D, BestCb> for Option<T>
where S: PlanningSolution, D: Director<S>, BestCb: BestSolutionCallback<S>, T: Termination<S, D, BestCb>,

Source§

fn should_terminate(&self, solver_scope: &SolverScope<'_, S, D, BestCb>) -> bool

Source§

fn install_inphase_limits( &self, solver_scope: &mut SolverScope<'_, S, D, BestCb>, )

Implementors§

Source§

impl<S, D, BestCb> MaybeTermination<S, D, BestCb> for NoTermination
where S: PlanningSolution, D: Director<S>, BestCb: BestSolutionCallback<S>,