pumpkin_constraints/constraints/
element.rs1use pumpkin_core::constraints::Constraint;
2use pumpkin_core::proof::ConstraintTag;
3use pumpkin_core::variables::IntegerVariable;
4use pumpkin_propagators::element::ElementArgs;
5
6pub fn element<ElementVar: IntegerVariable + 'static>(
8 index: impl IntegerVariable + 'static,
9 array: impl IntoIterator<Item = ElementVar>,
10 rhs: impl IntegerVariable + 'static,
11 constraint_tag: ConstraintTag,
12) -> impl Constraint {
13 ElementArgs {
14 array: array.into_iter().collect(),
15 index,
16 rhs,
17 constraint_tag,
18 }
19}