Take a constraints object ($c), the &’static str name of the state ($s), and a predicate
closure ($p). Box the closure and store it into the preconditions hashmap under it’s state name
along with an associated error message to use if the predicate fails.