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".