Trait clingo::SolveEventHandler [] [src]

pub trait SolveEventHandler {
    fn on_solve_event(&mut self, etype: SolveEventType, goon: &mut bool) -> bool;
}

Required Methods

Callback function called during search to notify when the search is finished or a model is ready.

If a (non-recoverable) clingo API function fails in this callback, it must return false. In case of errors not related to clingo, set error code ErrorType::Unknown and return false to stop solving with an error.

Attention: If the search is finished, the model is NULL.

Arguments

  • etype - the type of the solve event
  • goon - can be set to false to stop solving

Returns whether the call was successful

See: Control::solve()

Implementors