title: How to have a function as a member in a struct
body: <p>How can I specify a function in a struct definition? Something like this:</p>
  
  <pre class="lang-rust prettyprint-override"><code>struct Operation {
      params: Vec&lt;String&gt;,
      ops: Function&lt;Vec&lt;String&gt;&gt; -&gt; Vec&lt;String&gt;,
  }
  </code></pre>
  
  <p>I know that the syntax <code>Function&lt;Vec&lt;String&gt;&gt; -&gt; Vec&lt;String&gt;</code> is incorrect, but I am trying to specify that "Operation" has a field called <code>ops</code> that is a closure that takes a <code>Vec&lt;String&gt;</code> and returns a <code>Vec&lt;String&gt;</code>.</p>