title: Can traits be used on enum types?
body: <p>I read through the <a href="https://doc.rust-lang.org/rust-by-example/trait.html" rel="noreferrer">trait documentation</a> and found a neat definition for using traits on structs. Is it possible to use traits on <code>enum</code> types? I have seen answers that say no, but they are 3 years old and don't quite do what I'm trying to do.</p>
  
  <p>I tried to do this:</p>
  
  <pre><code>#[derive(Debug, Copy, Clone)]
  pub enum SceneType {
      Cutscene,
      Game,
      Menu,
      Pause,
      Credits,
      Exit,
  }
  
  //We want to guarantee every SceneType can be played statically
  trait Playable {
      fn play();
  }
  
  impl Playable for SceneType::Cutscene {
      fn play() {}
  }
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>error[E0573]: expected type, found variant `SceneType::Cutscene`
    --&gt; src/main.rs:16:19
     |
  16 | impl Playable for SceneType::Cutscene {
     |                   ^^^^^^^^^^^^^^^^^^^
     |                   |
     |                   not a type
     |                   help: you can try using the variant's enum: `SceneType`
  </code></pre>
  
  <p>I don't understand this error because the enum it references is in the same file. If I really can't use traits on enum variants, is there any way I can guarantee any enum trait must implement certain methods?</p>