title: How can I create enums with constant values in Rust?
body: <p>I can do this:</p>
  
  <pre><code>enum MyEnum {
      A(i32),
      B(i32),
  }
  </code></pre>
  
  <p>but not this:</p>
  
  <pre><code>enum MyEnum {
      A(123), // 123 is a constant
      B(456), // 456 is a constant
  }
  </code></pre>
  
  <p>I can create the structures for <code>A</code> and <code>B</code> with a single field and then implement that field, but I think there might be an easier way. Is there any?</p>