title: Accessing tuple from within an enum
body: <p>I have a Rust enum defined like this</p>
  
  <pre><code>enum MyFirstEnum {
      TupleType(f32, i8, String),
      StuctType {varone: i32, vartwo: f64},
      NewTypeTuple(i32),
      SomeVarName
  }
  </code></pre>
  
  <p>I have the following code:</p>
  
  <pre><code>let mfe: MyFirstEnum = MyFirstEnum::TupleType(3.14, 1, "Hello".to_string());
  </code></pre>
  
  <p>I'm following the Rust documentation and this looks fine. I don't need to define everything in the enum, but how would I go about accessing the mid element in the enum tuple?</p>
  
  <p><code>mfe.TupleType.1</code> and <code>mfe.1</code> don't work when I add them to a <code>println!</code></p>
  
  <p>I know Rust provides the facility to do pattern matching to obtain the value, but if I changed the code to define the other variants within the enum, the code to output a particular variant would quickly become a mess.</p>
  
  <p>Is there a simple way to output the variant of the tuple (or any other variant) in the enum?</p>