pub type clingo_solve_event_callback_t = Option<unsafe extern "C" fn(type_: clingo_solve_event_type_t, event: *mut c_void, data: *mut c_void, goon: *mut bool) -> bool>;
Expand description

! 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 ::clingo_error_unknown and return false to stop solving with an error. ! ! The event is either a pointer to a model, a pointer to an int64_t* and a size_t, a pointer to two statistics objects (per step and accumulated statistics), or a solve result. ! @attention If the search is finished, the model is NULL. ! ! @param[in] event the current event. ! @param[in] data user data of the callback ! @param[out] goon can be set to false to stop solving ! @return whether the call was successful ! ! @see clingo_control_solve()

Aliased Type§

enum clingo_solve_event_callback_t {
    None,
    Some(unsafe extern "C" fn(_: u32, _: *mut c_void, _: *mut c_void, _: *mut bool) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: u32, _: *mut c_void, _: *mut c_void, _: *mut bool) -> bool)

Some value of type T.