Skip to content

Add solution handler #9

@TeXitoi

Description

@TeXitoi

need a function in ffi in the form of

pub fn solve_with_parameters_and_handler(
    params: &proto::SatParameters,
    handler: impl FnMut(&proto::CpSolverResponse) -> std::ops::ControlFlow<()>,
) -> proto::CpSolverResponse;

Must check if FnMut is possible (CP-SAT must guarantee that the handler will not be called in parallel in any case), else we will use a Fn.

It must be SAFE! panic safe in particular.

need also the corresponding function in the builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions