solverforge-macros 0.10.0

Derive macros for SolverForge constraint solver
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fn generate_scalar_groups_impl(model: &ModelMetadata) -> TokenStream {
    model
        .solution
        .scalar_groups_path
        .as_ref()
        .map(|path| {
            quote! {
                #path(scalar_variables)
            }
        })
        .unwrap_or_else(|| {
            quote! {
                ::std::vec::Vec::new()
            }
        })
}