title: It is possible to generate a match between an enumeration and the content of a vector
body: <p>What I am trying to do is to define values ​​within an enumeration with different types of data, and then fill those values ​​into a vector.
  Then make a match between that vector and that enumeration so that it returns the value that the enumeration contains</p>
  
  <pre><code>#[derive(Debug)]
  enum Types {
      Int(i32),
      Float(f64),
      Text(String),
  }
  
  fn main() {
      let type = vec![Types::Int(3),Types::Float(3.3),Types::Text("Hi".to_string())];
      println!("{:?}",&amp;type[0]);
      //if let Types::Int(number) = &amp;type[0] {println!("{:?}",number)}
  
      println!("{:?}",Types::Int(3));
      match &amp;type {
          Types::Int(number) =&gt; number,
          Typer::Float(float) =&gt; float,
          _=&gt; None,
      }
  
  }
  </code></pre>