Function xor

Source
pub fn xor<Var, Value>(
    cs: Vec<Box<dyn Constraint<Var, Value>>>,
) -> Box<dyn Constraint<Var, Value>>
where Var: Eq + PartialEq + Hash + Clone + Debug + 'static, Value: Clone + Debug + 'static,
Expand description

Creates an exclusive-or constraint that requires exactly one sub-constraint to be satisfied. The constraint proceeds if exactly one sub-constraint can be satisfied and all others lead to failure. The constraint fails if zero sub-constraints can be satisfied.