title: Is there a faster/shorter way to initialize variables in a Rust struct?
body: <p>In the following example, I would much prefer to assign a value to each field in the struct in the declaration of the fields. Alternatively, it effectively takes one additional statement for each field to assign a value to the fields. All I want to be able to do is to assign default values when the struct is instantiated.</p>
  
  <p>Is there a more succinct way of doing this?</p>
  
  <pre><code>struct cParams {
      iInsertMax: i64,
      iUpdateMax: i64,
      iDeleteMax: i64,
      iInstanceMax: i64,
      tFirstInstance: bool,
      tCreateTables: bool,
      tContinue: bool,
  }
  
  impl cParams {
      fn new() -&gt; cParams {
          cParams {
              iInsertMax: -1,
              iUpdateMax: -1,
              iDeleteMax: -1,
              iInstanceMax: -1,
              tFirstInstance: false,
              tCreateTables: false,
              tContinue: false,
          }
      }
  }
  </code></pre>