Rule constructor

const Rule()

Lets a rule that carries no mutable state declare a const constructor.

Additive: a rule with its own non-const constructor is unaffected. It is here because a stateless rule like Required() or Url() is written inline in a widget's build, where a const instance is one allocation that never happens again.

Implementation

const Rule();