title: Can I create string enum in Rust?
body: <p>I am wondering is it possible to create <code>enum</code> with constant string values in Rust?</p>
  <p>I found this previous question: <a href="https://stackoverflow.com/questions/32710187/how-do-i-get-an-enum-as-a-string">How do I get an enum as a string?</a> which shows a work around that I can use to stringify variants of an <code>enum</code> (I can use <code>.to_string()</code> on <code>enum</code> variants and get their name as a string).</p>
  <p>That question was helpful, but this is what I want to achieve:</p>
  <pre class="lang-rust prettyprint-override"><code>enum StringEnum {
      Hello = &quot;Hello&quot;,
      World = &quot;World&quot;
  }
  </code></pre>