Skip to main content

SingleConstraint

Trait SingleConstraint 

Source
pub trait SingleConstraint { }
Expand description

Marks a type as one constraint.

Every IncrementalConstraint is also a one-constraint ConstraintSet through a blanket impl. Tuples of constraint sets and constraint-set chains are constraint sets through their own impls, and without this marker the compiler could not tell those impls apart from the blanket one. A hand-written constraint adds the empty impl SingleConstraint for MyConstraint {} next to its IncrementalConstraint impl. Never implement it for a tuple, a chain or any other type that holds several constraints: that type is already a ConstraintSet, and the marker would claim it is one constraint.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S, A, E, F, W, Sc> SingleConstraint for IncrementalUniConstraint<S, A, E, F, W, Sc>
where Sc: Score,

Source§

impl<S, A, K, E, F, KF, Sc> SingleConstraint for BalanceConstraint<S, A, K, E, F, KF, Sc>
where Sc: Score,

Source§

impl<S, O, A, W, Sc> SingleConstraint for SharedOperatorTerminal<S, O, A, OperatorScorer<W, Sc>, Sc>

Source§

impl<S, O, W, Sc> SingleConstraint for OperatorTerminal<S, O, W, Sc>

Source§

impl<S, Out, K, Src, F, KF, PF, W, Sc> SingleConstraint for Bi<S, Out, K, Src, F, KF, PF, W, Sc>
where Src: Source<S, Out>, Sc: Score,

Source§

impl<S, Out, K, Src, F, KL, KR, PF, W, Sc> SingleConstraint for DirectedBi<S, Out, K, Src, F, KL, KR, PF, W, Sc>
where Src: Source<S, Out>, Sc: Score,

Source§

impl<S, Out, Src, F, W, Sc> SingleConstraint for Uni<S, Out, Src, F, W, Sc>
where Src: Source<S, Out>, Sc: Score,

Source§

impl<S> SingleConstraint for ListPrecedenceMakespanConstraint<S>