title: What is the Rust type keyword?
body: <p>I have seen the keyword <code>type</code> used in some Rust examples, but I never have seen an explanation of it. A few examples of how I've seen it used:</p>
  
  <pre><code>impl Add&lt;Foo&gt; for Bar {
      type Output = BarFoo;
      // omitted
  }
  </code></pre>
  
  <p>and this, <a href="https://doc.rust-lang.org/reference/paths.html" rel="noreferrer">taken from the reference</a>:</p>
  
  <pre><code>type T = HashMap&lt;i32,String&gt;; // Type arguments used in a type expression
  let  x = id::&lt;i32&gt;(10);       // Type arguments used in a call expression
  </code></pre>
  
  <p>Could somebody please explain what this keyword does? I can't find it in Rust by Example or the Rust book.</p>